bat file error

conception_native_0123

Well-known member
Local time
Today, 05:34
Joined
Mar 13, 2021
Messages
1,918
i have bat file in which i using robocopy to overwrite files and folders. but what i notice is that it only copying ALL files inside of folders if those folders have at least ONE file changed since last time i copied it to target. but computer hope website says that not supposed to happen. i using the 'E' switch. what am i doing wrong? what i really wannt is everything copy from source to target that is new (new folders and files) or has newer update stamp (files only) than same files with same name in target. here is what i using as directions on computer hope


and this is my code in bat file. thank you

Code:
@echo off
echo Copying files from [C:\Users\source] to [D:\t]...
robocopy "C:\Users\source"  "D:\t" /E
echo All files have been copied.
exit
 
arne

this page https://www.computerhope.com/robocopy.htm

says same thing as this page

about 'e' switch. but when i use 'e' switch i notice that more than new files being copied. what is being copied it seems like are entire folders that have anything modified in them. that correct? the 'e' switch description does not say this.

but when i use 'is' switch i notice that only few files are copied over. so maybe you right. maybe IS is the right switch to use. but i am getting confused because this page

says this about IS switch
Overwrite existing files even if they are same.

that indicates all files. not just newer modified ones. is that right?
 
arne

does that sumtips websit ehave a root folder where all tips are listed? like computer hope does for bat files?

 

Users who are viewing this thread

Back
Top Bottom