Question Some questions about files in Windows and Robocopy

brannsiu

Distinguished
Apr 20, 2013
1,073
3
19,285
Hi all. I have been hearing about Robocopy for a long time but I haven't yet tried it, but now I have some critical files that copy-and-paste alone isn't enough for me.

I have got some questions.
1. Does Robocopy always preserve creation date of a file? I want to make backups of some files but copy-and-paste in Windows will update the creation dates for the copied files, this is why I have to start learning Robocopy.

2. Does it also copy sub-folders and hidden files? Do I need any special command?

In fact, now I need to make a copy of a directory which contains a lot of sub-folders and hidden files. I also need to keep everything including creation dates unchanged for the copied files. How to do it? I am very new to such things. Could there be any change for the copy?
 
Robo copy IS copy and paste, it's just a tool for doing so. IME it will show the date moved over as 'date modified'.

When using the tool there are a series of commands that tell it to do certain actions, so things like hidden files would be an additional part of the "script" (as it were) used for the action. I haven't used it some years now. There used to be a tool called Robo-Copy or Robot Copy that was basically just a console that you would tell it what you wanted done and it would output the command for you. At one point I was using scheduled tasks with those commands to do my backups.
 
Robo copy IS copy and paste, it's just a tool for doing so. IME it will show the date moved over as 'date modified'.

When using the tool there are a series of commands that tell it to do certain actions, so things like hidden files would be an additional part of the "script" (as it were) used for the action. I haven't used it some years now. There used to be a tool called Robo-Copy or Robot Copy that was basically just a console that you would tell it what you wanted done and it would output the command for you. At one point I was using scheduled tasks with those commands to do my backups.
What do you mean by "IME it will show the date moved over as 'date modified'."?
What is IME?
Wouldn't the creation date be preserved with the use of Robocopy? Is there something that will be altered for the copied one?
Can you tell me what to type to copy a directory from one location to another while hidden files are also copied, creation dates and other original values are preserved?
 
IME = in my experience.

I may not be understanding what you are asking, or unaware of what level of said. I am taking about in File Explorer a column over to the right , Date modified, or do you mean something else?
Hi, my level is a beginner. My aim is to make backup (copy) of files and folders while keeping their creation dates unchanged. As you know, if I just select a file and hit CTRL+C and CTRL+V, the new copy will have a new creation date, this is not what I want. I'd like to know how to get started.
 
robocopy /copy: DT would preserve both modified and created timestamps on files copied.
As far as my testing shows to me.
just /copy:T would copy ONLY timestamp, not data (file) itself so... take care to not mess up.

it's syntax is quite different from normal copy commands too
It will not by default copy files if they already exist in target place so if doing multiple tries to hone the command to work as you want, you might need to erase target location occasionally.

as suggested however, exact "what do I type?" question would need exact 100% correct "what do I want to copy from where to where and such" answer.
before blindly accepting scripts and/or command line command suggestion it is a good idea to have some understanding on what said command would do.

Typing robocopy /? is a good start for "what do I do?" Googling is good start also.
 
robocopy /copy: DT would preserve both modified and created timestamps on files copied.
As far as my testing shows to me.
just /copy:T would copy ONLY timestamp, not data (file) itself so... take care to not mess up.

it's syntax is quite different from normal copy commands too
It will not by default copy files if they already exist in target place so if doing multiple tries to hone the command to work as you want, you might need to erase target location occasionally.

as suggested however, exact "what do I type?" question would need exact 100% correct "what do I want to copy from where to where and such" answer.
before blindly accepting scripts and/or command line command suggestion it is a good idea to have some understanding on what said command would do.

Typing robocopy /? is a good start for "what do I do?" Googling is good start also.
Does Robocopy copy hidden files if there is any? Do I need any extra slash?
During the copying process, if some files in the source folders are not found or cannot be copied for any reason, will I be prompted to answer questions first (e.g. yes, no, skip, etc)?
 
robocopy does copy hidden files just fine too.
on files unable to be copied, there are /R:n (default retry one million times) and /w:n for wait time between retries.
I myself don't see real benefit in retrying million times
also being unable to copy is often an issue only with in-use system files or such, which might need different approach
with quick googling, /ZB could help with that.

only self testing would verify that though.
Robocopy cannot copy files that are not found though, no copying function can do that, robocopy does not have prompts for each file, if copied, copied, if skipped, skipped. and if copy fails (access problems, permission problems and so on) lists that too

/dcopy😀AT is likely useful though since default for directories doesn't preserve timestamps, DAT is default for files though. (so copies data, attributes and timestamp)

it usually helps to use /log+:file.txt to log the output to read said logs verify skipped files and such to make sure it works.
and possibly see any reasons why file was skipped and/or which files were skipped.