Author Topic: Robocopy  (Read 19681 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivy

  • Thread Starter
  • Posts: 3
Robocopy
« on: Thu, 03 November 2022, 06:32:13 »
how can I copy folders and files (60G) from windows 11 to windows server 2019 with keeping timestamps and NTFS/shared permissions using Robocopy ? how can I use Robocopy to transfer files with long pathnames without shortening the paths? Is there a way to make Robocopy schedule the transfers ?

Offline Darthbaggins

  • Posts: 644
  • Location: Acworth, GA
  • PC Cannibal
Re: Robocopy
« Reply #1 on: Thu, 03 November 2022, 09:58:26 »
The minute you interact with the file the timestamp will update to the current time since it is set to last time open/interacted with.

 bkrownd:"Those damned rubber chiclet keys are the devil's nipples."   >:D



Offline Coreda

  • Posts: 776
Re: Robocopy
« Reply #2 on: Thu, 03 November 2022, 11:41:57 »
Idk if the OP is a real question but nevertheless with Robocopy it's possible to preserve all timestamps in the copied output, including those of directories and their attributes.

Eg:

Code: [Select]
robocopy.exe "<source>" "<destination>" *.* /E /V /R:1 /W:5 /COPY:DATS /DCOPY:DAT
Replace <source> and <destination> with the appropriate directory paths, obviously.

*.* = match all files
/E = Copy sub-directories, including empty ones
/V = Verbose output, showing any skipped files
/R:1 = Number of retries on failed copies (in millions)
/W:5 = Wait time between retries (in seconds)
/COPY:DATS = Copy files' original Data (D), Attributes (A), Timestamps (T), NTFS ACL (S). (Personally I don't normally copy ACL info.)
/DCOPY:DAT = The above but for directories.

I haven't experienced any issues with long paths.

Offline Darthbaggins

  • Posts: 644
  • Location: Acworth, GA
  • PC Cannibal
Re: Robocopy
« Reply #3 on: Fri, 04 November 2022, 09:03:04 »
Idk if the OP is a real question but nevertheless with Robocopy it's possible to preserve all timestamps in the copied output, including those of directories and their attributes.

Eg:

Code: [Select]
robocopy.exe "<source>" "<destination>" *.* /E /V /R:1 /W:5 /COPY:DATS /DCOPY:DAT
Replace <source> and <destination> with the appropriate directory paths, obviously.

*.* = match all files
/E = Copy sub-directories, including empty ones
/V = Verbose output, showing any skipped files
/R:1 = Number of retries on failed copies (in millions)
/W:5 = Wait time between retries (in seconds)
/COPY:DATS = Copy files' original Data (D), Attributes (A), Timestamps (T), NTFS ACL (S). (Personally I don't normally copy ACL info.)
/DCOPY:DAT = The above but for directories.

I haven't experienced any issues with long paths.
interesting, did not know that - good to know.

 bkrownd:"Those damned rubber chiclet keys are the devil's nipples."   >:D



Offline Ivy

  • Thread Starter
  • Posts: 3
Re: Robocopy
« Reply #4 on: Sat, 05 November 2022, 03:27:07 »
The minute you interact with the file the timestamp will update to the current time since it is set to last time open/interacted with.

Thats why I need to copy folders and files with its original data

Idk if the OP is a real question but nevertheless with Robocopy it's possible to preserve all timestamps in the copied output, including those of directories and their attributes.

Eg:

Code: [Select]
robocopy.exe "<source>" "<destination>" *.* /E /V /R:1 /W:5 /COPY:DATS /DCOPY:DAT
Replace <source> and <destination> with the appropriate directory paths, obviously.

*.* = match all files
/E = Copy sub-directories, including empty ones
/V = Verbose output, showing any skipped files
/R:1 = Number of retries on failed copies (in millions)
/W:5 = Wait time between retries (in seconds)
/COPY:DATS = Copy files' original Data (D), Attributes (A), Timestamps (T), NTFS ACL (S). (Personally I don't normally copy ACL info.)
/DCOPY:DAT = The above but for directories.

I haven't experienced any issues with long paths.

yes, you are right, and I did a search and found that it works fine with windows 7 but we will see with windows 11

And for the long path name, now I am taking a look at some tools like long path tool, Syncback ,Teracopy and Gs Richcopy360  , because no way to shorten the paths , I need it as it .

 

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Robocopy
« Reply #5 on: Sat, 05 November 2022, 08:55:49 »
if you can't copy long path names it has nothing to do with copy or robocopy, it is a limitation of the windows filesystem, so i am afraid even if you manage to find something willing to do it (it is possible, i have seen it done) you will get files that are inaccessible and so useless.

story about seeing it done, it was on windows server 2016 at least (idk for other versions, it was what we had where i worked) possible to, using SMB, create situations where by coping/moving a folder the files in the folder would end up past the path length limit server side, and so become lost as the server had no way of accessing them. i had to find a copy of those files from before the move to get them back.
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline Ivy

  • Thread Starter
  • Posts: 3
Re: Robocopy
« Reply #6 on: Mon, 07 November 2022, 04:29:11 »
if you can't copy long path names it has nothing to do with copy or robocopy, it is a limitation of the windows filesystem, so i am afraid even if you manage to find something willing to do it (it is possible, i have seen it done) you will get files that are inaccessible and so useless.

story about seeing it done, it was on windows server 2016 at least (idk for other versions, it was what we had where i worked) possible to, using SMB, create situations where by coping/moving a folder the files in the folder would end up past the path length limit server side, and so become lost as the server had no way of accessing them. i had to find a copy of those files from before the move to get them back.
You are right. I wish someone give me a crack or a cracked version for one of these (Syncback or Gs Richcopy360), the trial versions work fine with copying timestamps, permissions, and long paths but it is very limited.
I appreciate your help to let me do the whole task without paying any cent :D

Offline spippy71

  • Posts: 19
Re: Robocopy
« Reply #7 on: Tue, 11 April 2023, 07:15:49 »
Sorry old thread just reading now.  I used GoodSync to do something similar.
« Last Edit: Tue, 11 April 2023, 16:59:50 by spippy71 »