If 0 = $CMDLine[0] Then Exit ;无参数,退 Local $sPath = $CMDLine[1] ;默认按目录处理 If 0 = FileExists($CMDLine[1] & '\') Then $sPath = PathToGetFolder($CMDLine[1]) ;不是目录,处理路径为目录 FileChangeDir($sPath) ;改变工作目录 MsgBox(0, 0, @WorkingDir) ;不解释 Exit ;更加不解释 Func PathToGetFolder($sPath) Local $sFolder = StringRegExpReplace($sPath, '^[^\\]*|[^\\]*$', '') Return $sFolder EndFunc ;==>PathToGetFolder
举报
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-23 07:38 , Processed in 0.070070 second(s), 13 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.