How can I save file's date&time?
Moderators: Hacker, petermad, Stefan2, white
How can I save file's date&time?
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.
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.
Ukrainian Total Commander Translator. Feedback and discuss.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I save file's date&time?
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.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I save file's date&time?
Is there any another way to set desired time/date?
Ukrainian Total Commander Translator. Feedback and discuss.
Re: How can I save file's date&time?
TC is capable to circumvent the bug if having root.
You may also want have a look at my guide regarding the timestamp
You may also want have a look at my guide regarding the timestamp

- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I save file's date&time?
I wouldn't root the device just for this bugfix. It can cause other problems like banking apps refusing to work etc.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I save file's date&time?
Hm. Is that possible on SD card without root?
Ukrainian Total Commander Translator. Feedback and discuss.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I save file's date&time?
No it's not. The Android functions to write to SD-Card do not include a function to set the timestamp.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I save file's date&time?
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?
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:
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.
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>
...
On Android device itself TC4A could prefer dates stored in .lst file if available, or show such dates in additional column or dialog.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708