How to write this command

I need the following to copy. The problem is that it is UNC, so I need to use pushd first to change the directory. How can I write oneliner to do this job?

<Exec Command="xcopy /Y /F /S /R /I bin\*.dll \\nas.rc.se\test\DLL\$(ProjName)\Latest\"/>

So, I’m after somthing like pushd xcopy .... but I don’t know how to write it to make it work. Is it possible?

+4
source share
1 answer
<Exec Command='cmd /c "pushd \\nas.rc.se\test\DLL\$(ProjName)\Latest\ & xcopy /Y /F /S /R /I bin\*.dll \\nas.rc.se\test\DLL\$(ProjName)\Latest\"'/>

in xmlattributes can be defined both with 'and ". This is necessary because the parameter passed to cmdrequires"

+3
source

Source: https://habr.com/ru/post/1583962/


All Articles