keep getting an error the syntax of the command is wrong

i have the following code where i'm trying to look for files and move them to a shared server. i keep getting an error about incorrect syntax. i'm trying to execute the bat file through psexec
here is what i have



I assume it runs fine without psexec.

What does your psexec line look like?

For debugging purposes, just run...



I assume it runs fine without psexec.

What does your psexec line look like?

For debugging purposes, just run...



You have %G that will need to be %%G in 3 places for starters.

Steve



no it says the syntax of the command is incorrect.
with the cmd /k command i get the filename, directory name, or volume label syntax is incorrect.

i'm sure the issue is with my variable use



Line 4 contains several errors and potential failures.



Using single quotes will work in most cases, but the official way is to use double quotes.

Share this

Related Posts

There was an error in this gadget