#dp0

DOS批处理中%cd%和%~dp0的区别

 运行命令的目录echo%cd%运行文件的目录echo%~dp0a.bat@echooffecho%cd%echo%~dp0C:Usersmacname>.Desktopa.batC:UsersmacnameC:UsersmacnameDesktopC:Usersmacname>cdDesktop...