xcopy is one of the most powerful dos commands. It is mainly used for copying files, but arguments create a monster of it :P
To use xcopy to update a folder from another you need to use :
xcopy H:\somefolder\*.* C:\updating\ /s/d/y/h/r
Here we are updating C:\updating using files in directory H:\somefolder.
Let’s see what those arguments mean:
- /s – copy subfolders
- /d – compare files by date (copy newer changed files only)
- /y – yes to overwrite and all the questions pc may ask :)
- /h – copy hidden files too
- /r – copy readonly files too
More info : xcopy help.