VBS 현재 스 크 립 트 가 있 는 폴 더 열기
' Wscript.Shell , Windows
Set objShell = CreateObject("Wscript.Shell")
'
strPath = Wscript.ScriptFullName
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPath)
'
strFolder = objFSO.GetParentFolderName(objFile)
strPath = "explorer.exe /e," & strFolder
' Windows ,
objShell.Run strPath
방법 2:obj Shell.CurrentDirectory이런 방법 은 코드 가 좀 적다.
set objShell = CreateObject("Wscript.Shell")
'
strPath = objShell.CurrentDirectory
strPath = "explorer.exe /e," & strPath
objShell.Run strPath
다음은 우리 편집장 의 보충 이다.스 크 립 트 에서 아래 의 간단 한 한 마디 를 호출 해 야 한다 면 현재 디 렉 터 리 를 가 져 올 수 있 습 니 다.
currentpath = createobject("Scripting.FileSystemObject").GetFolder(".").Path
혹시
currentpath = createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Path
더 간단 하지 않 을까요? 이 글 은 여기까지 공 유 됐 습 니 다.앞으로 많은 응원 부 탁 드 리 겠 습 니 다.