geekhack Community > Other Geeky Stuff

Robocopy

(1/2) > >>

Ivy:
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 ?

Darthbaggins:
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.

Coreda:
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: ---robocopy.exe "<source>" "<destination>" *.* /E /V /R:1 /W:5 /COPY:DATS /DCOPY:DAT
--- End code ---

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.

Darthbaggins:

--- Quote from: Coreda 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: ---robocopy.exe "<source>" "<destination>" *.* /E /V /R:1 /W:5 /COPY:DATS /DCOPY:DAT
--- End code ---

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.

--- End quote ---
interesting, did not know that - good to know.

Ivy:

--- Quote from: Darthbaggins 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.

--- End quote ---

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


--- Quote from: Coreda 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: ---robocopy.exe "<source>" "<destination>" *.* /E /V /R:1 /W:5 /COPY:DATS /DCOPY:DAT
--- End code ---

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.

--- End quote ---

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 .

 

Navigation

[0] Message Index

[#] Next page

Go to full version