ラブびあ

ビール。ときどきラブ

ローカルのフォルダを開く.vbs

Option Explicit

dim wsh
set wsh = CreateObject("WScript.Shell")

dim fso
set fso = CreateObject("Scripting.FileSystemObject")

dim cfg
cfg = fso.BuildPath( _
         fso.GetParentFolderName(WScript.ScriptFullName), _
         "サーバとローカルのパス.txt" )
ExecuteGlobal fso.OpenTextFile(cfg).ReadAll

dim arg
for each arg in WScript.Arguments
  dim s
  s = fso.GetParentFolderName(Replace(arg, sroot, lroot))
  call CreateFolder(s)
  wsh.Run "rundll32.exe url.dll , FileProtocolHandler " & s, vbNormalFocus, false
next

sub CreateFolder(path)
  if not fso.FolderExists(path) then
    call CreateFolder(fso.GetParentFolderName(path))
    fso.CreateFolder path
  end if
end sub