• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help File date inconsistencies when backing up files between PC and Android

EM1336

Lurker
Mar 14, 2015
4
0
I'm trying to set up a way to mirror a folder on my Windows 7 PC with a folder on the internal sdcard of my Android phone. Essentially, I want to take a core set of files that I'm constantly working on (constantly adding, deleting, and modifying files), with me at all times, and be able to synchronize the folder to always have the newest versions of each modified file, whether the newest version was from the PC or from the phone.

For what it's worth, I have an LG G2 (work, running Android 4.4.4), Nexus 5 D820 (personal, running Android 5), an HP laptop (work), and a Sony laptop (personal); both laptops running Windows 7 Professional 64-bit.

I see strange file creation date inconsistencies when I back up files from either PC to the internal sdcard on either phone, and also when I copy those files back to either PC. I'm wondering if anyone else has experienced similar file date inconsistencies and if you know of any workarounds.

In almost every case, when I copy files from my PC to the phone, the files display from the PC's frame of reference (from the FTP client on the PC) as if they are all exactly 4 hours old for created, modified, and accessed. I happen to be in Eastern Time Zone, but my phone and computer have the date, time, and time zone set correctly, so I don't know why the files are showing as four hours behind for all three timestamp attributes, immediately after copying the files.

Furthermore, in almost every case, when I copy the files from the phone's internal sdcard back to the PC, the original (true) creation date reappears! Apparently, Android preserves the creation date inside the files somehow, but doesn't display the true created date as long as the file is in Android's realm. As soon as the file is out of Android's grasp and back on the PC, the true created date appears in the Properties dialog. However, the modified date still shows 4 hours ago, and the accessed date shows a few seconds or minutes ago.

I'm using Andreas Liebig's FTPServer on the phone (look on Google Play) to allow me to access the internal sdcard using FTP instead of MTP. NetDrive on the PC gives the internal sdcard a drive letter in Windows, so that I can use folder sync software. (After configuring and starting FTPServer on the phone, right-click on the NetDrive icon in Windows and choose Run as Administrator.) The shortcut on my PC is using a string in this format to access the internal sdcard on the phone in a normal Windows Explorer interface:

C:\Windows\explorer.exe "ftp://username: password@192.168.43.1:7777/storage/emulated/0"
(You would change the username, password, IP address, port, and internal sdcard path to match your particular phone's FTPServer setup.)

This is necessary because Windows is using NTFS or FAT32, whereas Android is using ext3 (Linux file system), so there is no way to access the internal sdcard directly, as you could with an external sdcard or USB stick that would typically be using FAT or FAT32 file system.

Once I had FTPServer and NetDrive up and running, I tried a PC-to-phone backup procedure on a folder of simple text files with:
SafeCopy,
Robocopy [source] [destination] /MIR /DCOPY:T
XXcopy [source] [destination] /TC
SyncToy,
Araxis Merge,
and FileSync Pro.

The results are nearly the same for the first 5 in the list. I set the dates and times using a file date changer called Febooti FileTweak Pro. (With FileTweak Pro, I go into the file Properties, click on the File Date tab, check the checkboxes for Created, Modified, and Accessed, and type 1 1 1 1 1 1, 2 2 2 2 2 2, and 3 3 3 3 3 3.) The results for the first 5 on the list are as shown here:

Original text file on my PC:
Created = 1 Jan 2001 01:01:01.
Modified = 2 Feb 2002 02:02:02.
Accessed = 3 Mar 2003 03:03:03.

After copying the text file to the phone's internal sdcard and looking at the sdcard from the PC:
CD = exactly 4 hours ago.
MD = exactly 4 hours ago.
AD = exactly 4 hours ago.

After copying the text file back to the PC:
CD = 1 Jan 2001 01:01:01.
MD = exactly 4 hours ago.
AD = nearly this instant.

The one exception was FileSync Pro. For FSP, the phone apparently loses the original file creation date, and doesn't acknowledge that the file has been accessed. When I copy the file back to the PC, the results are:

CD = exactly 4 hours ago (not 1 Jan 2001).
MD = exactly 4 hours ago.
AD = exactly 4 hours ago (not a few seconds or minutes ago as you'd expect).

After using FileSync Pro, when I try to access the file to see if that is sufficient to cause the date to change, the Properties window for the file looks different than usual, like halfway between an Explorer window and an FTP window, and any attempts to access the file result in the message, "The server does not allow changing of file permissions" or something to that effect. This only happens with FileSync Pro. I have to close FSP, close the Explorer window, and reopen the window with the FTP shortcut, to return to the normal Properties window - but the file still shows Accessed = 4 hours ago.

All of this is maddening for someone trying to create mirrored folders on a PC and an Android device, without resorting to some kind of "walled garden"-type software that tries to insulate you from your own files. I would prefer not to have to use an iTunes-like solution to keep my files' created and modified timestamps intact, but if there is such a solution, please let me know.
 
Last edited:
Follow-up post of related problems:

This is not so much another question as a further set of observations that others may find helpful. My computer kept locking up when I tried to use file synchronization software to synchronize a folder on my PC with a folder on my phone (disregarding the annoying file stamp problems mentioned in the first post). After experimenting with various different file transfers, I learned what worked and what didn't work. Your results may vary.

Firstly, my various file and folder synchronization programs (FileSync, Araxis Merge, and so on) copy fine if there are only small files involved such as text files. The programs choke if there are any larger files such as MP3 files.

Out of curiosity, I opened two types of Explorer windows, both accessing the phone's FTPServer app:
(1) Standard FTP window using an FTP shortcut link.
(2) NetDrive window – on my computer, this appeared as the next drive letter, F:

When copying and pasting text files from the PC interface, these worked:
PC to Android using FTP (that is, FTP shortcut on the PC and FTPServer running on the phone).
PC to Android using NetDrive (copy and paste to my NetDrive F: drive).
Android to PC using FTP.
Android to PC using NetDrive (copy and paste from F: drive).
Android to Android from FTP window to NetDrive F: window.
Android to Android from NetDrive F: window to FTP window.
Android to Android using two NetDrive F: windows opened side-by-side.

This did NOT work:
Android to Android using two FTP windows. The copy worked, but the paste button was grayed out.


When copying and pasting MP3 files from the PC interface, these worked:
PC to Android using FTP.
PC to Android using NetDrive (copy and paste to F: drive).
Android to PC using FTP.
Android to PC using NetDrive (copy and paste from F: drive).
Android to Android from FTP window to NetDrive F: window – this was the only Android-to-Android method that worked from the PC. (The alternative is to copy and paste files from within the Android interface on the phone.)

These did NOT work:
Android to Android from NetDrive F: window to FTP window – tons of messages appear on the FTPServer log window on the phone, but the PC locks up and the file transfer ultimately fails after several minutes.
Android to Android using two NetDrive F: windows – again, tons of FTPServer log messages, but the PC locks up and the file transfer fails.
Android to Android using two FTP windows – the copy worked, but the paste button was grayed out.


If you have a laptop with bluetooth, you can bluetooth any files back and forth from the Android interface. Open ES File Explorer, find the file, hold down on the file until the checkbox appears, check the checkbox, then click More on the bottom of the screen, click on Share, select Bluetooth, and select the PC. (Make sure the PC's bluetooth is configured to accept the file.) I use this method as a stopgap measure, to transfer my To Do list back and forth, until I figure out how to solve the dual conundrums of why file created and modified time stamps are not sticking, and why file transfers are freezing up the PC. Unfortunately, only one of my laptops has functional bluetooth, so I can't use this awesomely-easy method half of the time.

Android is incredibly frustrating. I feel like I have to keep mentally switching gears to bridge the Windows-Android chasm, and something so simple as working with text files on a PC seems torturous on Android. I tried various Android apps such as Google Docs, Goolge Keep, Notebook, Evernote, Richnote, and Simplenote, but only Polaris Office allowed me an easy, efficient way to work with plain text files, rather than HTML, DOCX, PDF, or .note format. I don't want to have to depend on an Internet connection, cloud account, or bulky office suite just to update my To Do list, for example.

For now, until I figure out an easier way, I actually have three To Do lists which are all simple text files:
To Do list 1 (Android).txt – for my short-term tasks.
To Do list 2 (PC).txt – for medium and long-term tasks.
To Do list 3 (unified).txt – everything all thrown together.

I created a tiny batch file called unify.bat to integrate my To Do list on the phone with my To Do list on the PC with one double-click of the mouse, as follows:

Open an explorer window.
Shift-right-click and choose Open command window here.
Copy con unify.bat
Copy /A /Y "To Do list 1 (Android).txt" + "To Do list 2 (PC).txt" "To Do list 3 (unified).txt"
Hit F6 and save.
Then, each evening, I copy the To Do list from my phone onto the PC and double-click on the batch file to integrate everything. This is a crazy method but, for now, the only way I could sidestep the time stamp and copy failure problems I've encountered with file synchronization programs.
 
Upvote 0
With a 5% market share and an overly flamboyant Win-8 type interface, a Windows phone doesn't seem like a winning long-term strategy, especially considering it won't run the apps that my job requires (apps that require either Android or iOS). Heck, I've never even seen one. They must keep them well-hidden in the stores. A Windows phone might use FAT32 or exFAT internally, so you have a good point - but FAT32 is antiquated and lacks the built-in security features of more modern file systems. Even with a FAT-type file system, who's to say I wouldn't have the same issues with file time stamp inconsistencies and FTP freeze-ups? The Android OS seems to be the culprit here just as much as Win 7. I'm sticking with Android - don't read me wrong, I love this OS. We're in the equivalent of the IBM PC AT era with Android, with the architecture feeling very much like a work-in-progress. An external sdcard slot would be the easiest solution, but Google seems determined to do away with them.
 
Upvote 0
I know this is a bit old, but wanted to let you know you aren't the only one with these issues. I've been lucky in the past getting my files to sync with correct timestamps. Since moving past 4.2.2, these get MUCH harder, even with root. Google has been aware of the timestamp issue since 2009, but seems like most companies, to add features and forget bugs.

Here is the link to the issue:
https://code.google.com/p/android/issues/detail?id=18624

BTW, I've had no issues with FTP, but then I use a program called BestSync to do the FTPing on the PC side.
 
  • Like
Reactions: scary alien
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones