Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

So lets take this sample for example:
Set objShell = WScript.CreateObject ("WScript.shell")

objShell.run "cmd /K CD C:\ & Dir & cd c:\maor"


I dont understand what the "&"'s role in the command, why was it added.

Please help.

Thanks in advance.

What I have tried:

Ive tried googling, as well as reading sample commands.
Posted
Updated 12-Nov-17 5:13am

1 solution

This has nothing to do with the script but with the command line. Google for "CMD &" to find out more.

It just a separator to run multiple commands on the same command line at a CMD prompt.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900