Looking for a way to bypass time difference when xcopying


mlamiroy

Member
Local time
10:14 PM
Posts
20
OS
Windows 11
I have several batch files that keep the data on my computers synchronized. I also use them to make backups to USB.
I made the mistake of restoring data from a backup on a USB flash drive, and now there is a time difference for the files from the USB drive, where they are slightly newer.
So, after restoring from the USB, synchronizing - via xcopy /s /d /y - goes wrong in that it considers all files newer.

Is there a way to bypass this or should I update all batch files to use robocopy instead?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Matrix (local brand)
    CPU
    Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz 3.60 GHz
    Motherboard
    Asus Prime H510M-K
    Memory
    8GB
    Graphics Card(s)
    NVIDIA
    Sound Card
    -
    Monitor(s) Displays
    Samsung & Dell
    Screen Resolution
    1600*900 (for both)
How much difference is "slightly newer"? How is the USB drive formatted? NTFS? ExFAT? FAT32?

The RoboCopy /FFT option to round to the nearest 2 seconds may be helpful, depending on how much difference we're talking about.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
How much difference is "slightly newer"? How is the USB drive formatted? NTFS? ExFAT? FAT32?
The time difference varies from file to file. On some it's one second, but I've also found some with a difference of up to 8 seconds.
It's a flash drive, so Fat32.
The RoboCopy /FFT option to round to the nearest 2 seconds may be helpful, depending on how much difference we're talking about.

Thanks.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Matrix (local brand)
    CPU
    Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz 3.60 GHz
    Motherboard
    Asus Prime H510M-K
    Memory
    8GB
    Graphics Card(s)
    NVIDIA
    Sound Card
    -
    Monitor(s) Displays
    Samsung & Dell
    Screen Resolution
    1600*900 (for both)
My experience over the years is that copying folders will change the date and time, Windows File Explorer first creates a new folder which gets the current date and time in the destination then copies files into that folder with the files retaining their date/time of creation. If wanting to change any of the Attributes such as date or name I use one of the usually-free file managers such as FreeCommander, MultiCommander, etc., that I download from MajorGeeks. And some will be Portable, can use on a USB Thumb drive without actually installing, just download a .zip file and decompress into a folder.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 2TB WDC HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Thanks, all.
I'll switch to robocopy.
I'm already using for some batch files.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Matrix (local brand)
    CPU
    Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz 3.60 GHz
    Motherboard
    Asus Prime H510M-K
    Memory
    8GB
    Graphics Card(s)
    NVIDIA
    Sound Card
    -
    Monitor(s) Displays
    Samsung & Dell
    Screen Resolution
    1600*900 (for both)
Back
Top Bottom