Page 1 of 1
How can I save file's date&time?
Posted: 2019-12-12, 20:10 UTC
by MaxX
Hi.
I need to move (or copy) some files from MicroSD to internal storage of my Android smartphone.
When I move (or copy) them, their original date&time is lost.
How can I save original file's date&time?
Android 7 on AGM A8 4/64 + Newest TC from Google Play.
Re: How can I save file's date&time?
Posted: 2019-12-16, 10:50 UTC
by ghisler(Author)
You can't because there is a bug in the function to set the time of a file. This was only fixed in Android 9.
Re: How can I save file's date&time?
Posted: 2019-12-16, 12:46 UTC
by MaxX
Is there any another way to set desired time/date?
Re: How can I save file's date&time?
Posted: 2019-12-16, 13:12 UTC
by tag
TC is capable to circumvent the bug if having root.
You may also want have a look at my
guide regarding the timestamp 
Re: How can I save file's date&time?
Posted: 2019-12-17, 09:17 UTC
by ghisler(Author)
I wouldn't root the device just for this bugfix. It can cause other problems like banking apps refusing to work etc.
Re: How can I save file's date&time?
Posted: 2019-12-17, 17:08 UTC
by MaxX
Hm. Is that possible on SD card without root?
Re: How can I save file's date&time?
Posted: 2019-12-18, 10:30 UTC
by ghisler(Author)
No it's not. The Android functions to write to SD-Card do not include a function to set the timestamp.
Re: How can I save file's date&time?
Posted: 2019-12-19, 10:40 UTC
by tag
It should be possible to put the sd card into an external device (for instance mobile router with card reader like RAVpower Filehub or Kingston MobileLite) that implements a samba server, and there set the timestamp via SAMBA, from the Android device (via copying or directly set the timestamp). Afterwards you can put the card back if wanted, or stay with the WLAN access.
Re: How can I save file's date&time?
Posted: 2019-12-22, 12:54 UTC
by DrShark
In Total Commander for Android date saving could be implemented by writing source files date data to <dirname>.lst file (DiskDir (Extended) compatible format) in dir to where files are copied/renamed.
File format seems to be good for this purpose, because it allows to store required file data, example:
Code: Select all
<file name 1> <size> <date> <time>
<file name 2> <size> <date> <time>
...
Then dates could be restored for such files when they are copied to PC with desktop TC using Change Attributes->From Target.
On Android device itself TC4A could prefer dates stored in .lst file if available, or show such dates in additional column or dialog.