If you want to know where the batch file lives: %~dp0
%0 is the name of the batch file. ~dp gives you the drive and path of the specified argument.
or
@echo off
SET currentpath = %~d0%~p0
echo %currentpath%
pause
Wednesday, January 12, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment