Meaning of %%~dpa?

I am given to maintain some batch files and i repeatedly see this line in the beginning of every batch file..

FOR /f "usebackq tokens=*" %%a IN ('%0') DO SET this_cmds_dir=%%~dpa
CD /d "%this_cmds_dir%"

Does anyone know what the first line does? What is %%~dpa? What is %0 ? What is usebackq?

6
задан Santhosh 8 September 2010 в 11:11
поделиться