I would like either a command prompt solution or a Visual Studio 2008 solution for the following:
I am building a solution in Visual Studio 2008 C# and I need to test it.
In order to test the solution, I need to copy it to a different machine.
My process is:
- copy debug folder to shared location
- copy from the shared location onto the source machine
I try to do it like this:
rmdir s:\debug /s /q
s:
md debug
copy "C:\Documents and Settings\user123\Desktop\eFormsSystem\eFormsApp\bin\Debug\*.*" s:\debug\
however it is saying that THE SYSTEM CANNOT FIND THE PATH SPECIFIED.
I am certain there is a problem with the code above; however I would like to know:
- Is there a way to do this using Visual Studio? I would want it to copy the debug directory into a shared location as soon as there is a build.
- If command prompt is better suited for this, can you please tell me what is wrong with my code above?
There are two things you can try. First is try using the switches on the copy command like you did for the rmdir command. Try adding the /Y and /Z switches.
existing destination file.
May just want to try this first. I know the /Y is redundant since you are removing the destination directory before copying.
Secondly, you asked if you could do this from Visual Studio. You could use the post-build event on the project to copy files to another location on the network after a successful build. However, you first need to get the command working.