uprichard
Programmer
- May 2, 2002
- 16
I have a script that I use to perform filesystem functions. Is there anyway to check the status that comes back from the call?
I know I could do a check to see that a new file exists after a copy and that the file does not exist after a delete etc, but that seams very long approach.
Thanks for any help.
Set fso = CreateObject("Scripting.FileSystemObject"
Select Case Action_Value
Case "move"
fso.MoveFile Source_Value, Dest_Value
Case "rmdir"
fso.DeleteFolder Source_Value, TRUE
Case "mkdir"
fso.DeleteFolder Source_Value, TRUE
Case "delete"
fso.DeleteFile Source_Value, TRUE
Case "copy"
fso.CopyFile Source_Value, Dest_Value
Case Else
msgbox "Invalid arg"
End Select
I know I could do a check to see that a new file exists after a copy and that the file does not exist after a delete etc, but that seams very long approach.
Thanks for any help.
Set fso = CreateObject("Scripting.FileSystemObject"
Select Case Action_Value
Case "move"
fso.MoveFile Source_Value, Dest_Value
Case "rmdir"
fso.DeleteFolder Source_Value, TRUE
Case "mkdir"
fso.DeleteFolder Source_Value, TRUE
Case "delete"
fso.DeleteFile Source_Value, TRUE
Case "copy"
fso.CopyFile Source_Value, Dest_Value
Case Else
msgbox "Invalid arg"
End Select