Jump to content

multi commands not working ? && ?


zadax

Recommended Posts

Hi guys,

I am new here and i would like to get some assistance with some coding.

ok so basically what i am doing is adding a command line to be lunched after download is completed

COPY (using xcopy) 1 file from A to B

A = some local dir

B = using the "%D\"

So basically i am running this command:

C:\Windows\System32\xcopy.exe "C:\file.bat" "%D\"

Untill here, no problems, i manged and it worked fine.

now the problematic thing is actually to run the file.bat that i just copied.

i know that adding this code after the copy :

&&

should separate between commands and it spouse to start new command

(you can try it in cmd and see that it works)

but when adding this "&&" i am getting nothing. (means the copy also not working anymore)

my final code:

C:\Windows\System32\xcopy.exe "C:\file.bat" "%D\" && "%D\file.bat"

but that just cancel the copy and does nothing.

Anyone?

any ideas?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...