|
|
@ -2,11 +2,18 @@ Option Explicit
|
|
|
|
|
|
|
|
|
|
|
|
Const BIF_returnonlyfsdirs = &H0001
|
|
|
|
Const BIF_returnonlyfsdirs = &H0001
|
|
|
|
|
|
|
|
|
|
|
|
Dim wsh, objDlg, objF, fso, spoFile
|
|
|
|
Dim wsh, objDlg, objF, fso, spoFile, args
|
|
|
|
Set objDlg = WScript.CreateObject("Shell.Application")
|
|
|
|
|
|
|
|
Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
|
|
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set args = Wscript.Arguments
|
|
|
|
|
|
|
|
if args.count > 0 Then
|
|
|
|
|
|
|
|
Set ObjF = fso.GetFolder(args.Item(0))
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Set objDlg = WScript.CreateObject("Shell.Application")
|
|
|
|
|
|
|
|
Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs).Self
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
If fso.FileExists("DF_PATH.txt") Then
|
|
|
|
If fso.FileExists("DF_PATH.txt") Then
|
|
|
|
fso.DeleteFile "DF_PATH.txt", True
|
|
|
|
fso.DeleteFile "DF_PATH.txt", True
|
|
|
|
End If
|
|
|
|
End If
|
|
|
@ -14,7 +21,7 @@ End If
|
|
|
|
If IsValue(objF) Then
|
|
|
|
If IsValue(objF) Then
|
|
|
|
If InStr(1, TypeName(objF), "Folder") > 0 Then
|
|
|
|
If InStr(1, TypeName(objF), "Folder") > 0 Then
|
|
|
|
Set spoFile = fso.CreateTextFile("DF_PATH.txt", True)
|
|
|
|
Set spoFile = fso.CreateTextFile("DF_PATH.txt", True)
|
|
|
|
spoFile.WriteLine(objF.Self.Path)
|
|
|
|
spoFile.WriteLine(objF.Path)
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|