Question

How can I copy Resources subdirectory to TargetDir after Build?

I tried:

copy “$(ProjectDir)\Resources” “$(TargetDir)”

but this copy files, not directory

EDIT

xcopy /s “$(ProjectDir)\Resources” “$(TargetDir)”

gives the same result

Was it helpful?

Solution

Try this:

xcopy /ey "$(ProjectDir)CellEditing" "$(TargetDir)CellEditing\"
  • The /e parameter is used to indicate recursive copy (including empty directories)
  • The /y parameter is used so it overwrites files if you run it again
  • Don't forget the trailing \ at the end of the destination otherwise xcopy doesn't know whether you are specifying an output directory or an output file name.

See also write a batch file to copy files from one folder to another folder

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top