user1540911
user1540911

Reputation: 375

How do I write this command

I need the following to be copy. The problem is that is an UNC so I need to use pushd to change directory first. How can I write a oneliner to make this work?

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

So I am after somthing like pushd xcopy.... but dont know how to write it to make it work. Is it possible?

Upvotes: 4

Views: 36

Answers (1)

npocmaka
npocmaka

Reputation: 57302

<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 xml attributes can be defined both with ' and " .This is needed because the parameter passed to the cmd needs "

Upvotes: 3

Related Questions