`
nsxd15nsxd
  • 浏览: 13969 次
社区版块
存档分类
最新评论

vbs脚本:ExplorerSel

 
阅读更多

vbs脚本:ExplorerSel
2010年08月09日
  Rem : =========== 打开浏览器,选中指定文件或文件夹 Rem : =========== 文件或文件夹必须存在 Sub ExplorerSel(path) Dim f f = Trim( path ) IfRight(f,1) = "\" Then f = Left(f,Len(f) -1 )If fso.fileexists(f) = False And fso.folderexists(f) = False ThenErr.Raise vbObjectError+128, "ExplorerSel", f & " does not exists" Dim errMsg OnError Resume NextRem ====== code begin shell.Run "explorer.exe /select," & Chr(34) & f & Chr(34),1,TRUE Rem ====== code endIfErr.Number 0 Then errMsg = Err.Description OnError Goto 0 Err.Raise vbObjectError+128, "ExplorerSel", errMsg & vbNewLine & _ " path:" & vbTab & path ExitSubEndIfEndSub
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics