Reputation: 21
The thing i need help is if the user types the string: commandLine("Dir")
then it will take the Dir from commandLine("Dir")
and make it to a variable
Example:
C:\> program.bat commandLine("Dir")
program.bat:
echo the command is: Dir
pause
Upvotes: 0
Views: 52
Reputation: 339
Try this:
echo off
set str=%1
set str=%str:CommandLine("=%
set str=%str:")=%
echo on
echo the command is: %str%
Upvotes: 1