J junaidahmed Well-Known Member Licensed User Longtime User Mar 19, 2012 #1 When I Copy file from source to destination,the modified date for destination file has changed. For Example Source File : - /mnt/sdcard/Report.doc ----------> Last modified Date is 14/02/2012 Destination File :- /mnt/sdcard/Data/Report.doc --------> Last modified Date is 19/03/2012. "Why ?" But in windows the date is same when copy from source to destination. Pls advise,wheather it is a bug in Android or some other thing.
When I Copy file from source to destination,the modified date for destination file has changed. For Example Source File : - /mnt/sdcard/Report.doc ----------> Last modified Date is 14/02/2012 Destination File :- /mnt/sdcard/Data/Report.doc --------> Last modified Date is 19/03/2012. "Why ?" But in windows the date is same when copy from source to destination. Pls advise,wheather it is a bug in Android or some other thing.
Erel B4X founder Staff member Licensed User Longtime User Mar 19, 2012 #2 File.Copy is an internal implementation that creates a new file and copies the data from the current one. It is not a system command. There is no access to a system "copy" command from Java. You can try setting the date after the copy: http://www.b4x.com/forum/basic4android-updates-questions/8670-file-system.html#post59577 Upvote 0
File.Copy is an internal implementation that creates a new file and copies the data from the current one. It is not a system command. There is no access to a system "copy" command from Java. You can try setting the date after the copy: http://www.b4x.com/forum/basic4android-updates-questions/8670-file-system.html#post59577
J junaidahmed Well-Known Member Licensed User Longtime User Mar 19, 2012 #3 Thanks Erel.As per below code now I can set Modified Date for file using Refelector,but I would like to know how to get Modified Date for file Upvote 0
Thanks Erel.As per below code now I can set Modified Date for file using Refelector,but I would like to know how to get Modified Date for file
Erel B4X founder Staff member Licensed User Longtime User Mar 19, 2012 #4 You can use File.LastModified to get the date. Upvote 0