Combining These Different Psxec Commands in One Line RRS feed

  • Question

  • I use a bat script and it has some PsExec commands. We want to combine these two commands in one psexec line. We tried something [ ^&, &&, &, (cmd1 & cmd2) etc.. but it didn't work.

    First Command:

    psexec \\HostName cmd /c "for /d %%a in ("D:\folder") do rd /s /q "%%a""

    Second Command:

    psexec \\HostName -c TEST7.bat


    Friday, September 19, 2014 12:22 PM