1.

Solve : DOS Command help needed?

Answer»

I thought I knew DOS fairly well but I am having trouble with a batch file that was written by someone else and passed to me to run. (That someone is no LONGER with the company) What does the following parameters mean in this line:


cd /d "%~dp0"

BTW - there are no parameters passed when the batch file is executed. The procedure end result is actually working but I am trying to understand what this does.

cd /d .... means change drive and DIRECTORY
%0 is the name of the program
the modifier ~dp means take the drive and directory

so basically, it just changes the current drive and directory to where the batch file resides

Graham



Discussion

No Comment Found