How to copy files that does not exist in the target directory

If you want to copy only those files to a directory that NOT exist in the target directory without overwriting existing files or without beeing prompted you can use a more complex cmd-line to achieve this:

 

forfiles /m *.* /c "cmd /c if not exist <sourcePath>\@file (xcopy @file <targetPath>\@file /v)"

 

The forfiles /m *.* loops through all files in the current directory and execudes (/c) the commoand in quotation marks. This command test (if not exist <sourcepath>\@file) the existence of the file in the specified directory and if the file does not exist xcopies it including verification to the target directory.

 

Have fun