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?