I am using XCOPY in a post-build event to copy compiled DLLs from their output folders to the main app's output folder. The DLLs are being copied to a "Modules" subfolder in the main app output folder, like this:
xcopy "$(TargetPath)" "$(SolutionDir)Prism4Demo.Shell\$(OutDir)Modules\"
The command works fine if the Modules folder exists, but I have discovered during testing that if the folder doesn't exist, XCOPY doesn't create it, and the command fails.
Is there an XCOPY switch that will cause the folder to be created if it doesn't exist? If not, what would I add to my post-build event to create the folder if it doesn't exist? Thanks for your help.
I tried this on the command line using
and the target directory was properly created.
If not you can create the target dir using the
mkdir
command withcmd
's command extensions enabled like('/x' enables command extensions in case they're not enabled by default on your system, I'm not that familiar with
cmd
)use
for further information :)