for /f %%i in ("%0") do set curpath=%%~dpi
cd /d %curpath%

출처 : http://blogs.msdn.com/b/oldnewthing/archive/2005/01/28/362565.aspx

728x90

+ Recent posts