deleyd
asked on
What does this do? SET CDIR=%CDIR:~0,-24%
Lines in a DOS batch file (e.g. ABCDEFGHIJKLMNOP.BAT) What do these lines do?
The first line gets the name of the batch file itself.
Then what's all that rest do with the file name?
The first line gets the name of the batch file itself.
Then what's all that rest do with the file name?
SET CDIR=%0
SET CDIR=%CDIR:~0,-24%
SET LIST=%CDIR:~0,32%
SET LIST=%LIST:~-6%
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Steve for that information. It was very helpful. :)
Open in new window
If it is run just using "1" from command prompt:
Open in new window
If it is run using c:\users\stephen\1.cmd
Open in new window
Also if you do want (maybe?) the 6 characters from character 26 in the name then you can use:
Open in new window