XCOPY switch to create specified directory if it doesn’t exist?

Answer to use “/I” is working but with little trick – in target you must end with character \ to tell xcopy that target is directory and not file! Example: xcopy “$(TargetDir)$(TargetName).dll” “$(SolutionDir)_DropFolder” /F /R /Y /I does not work and return code 2, but this one: xcopy “$(TargetDir)$(TargetName).dll” “$(SolutionDir)_DropFolder\” /F /R /Y /I Command … Read more