Tuesday, September 21, 2010

VBScript: Filesystem stuff

Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FolderExists(ORIGINAL) then
Const FOF_CREATEPROGRESSDLG = &H0&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(TARGET)
objFolder.MoveHere ORIGINAL, FOF_CREATEPROGRESSDLG
If objFSO.FolderExists(ORIGINAL) then
objFolder.MoveHere ORIGINAL, FOF_CREATEPROGRESSDLG
end if

Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")

if FSO.FileExists(ORIGINAL & "\config\Discovery.xml") then
FSO.CopyFile ORIGINAL & "\config\Discovery.xml", InstallLocation & "\config\"
End If
end if

No comments:

Post a Comment