Copy Resources while building project
-
25-10-2019 - |
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
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