Hello to everyone. I have a problem with a VBS script in WSH. This script is basically to do a backup. I'm relatively new to VBS and I'm trying to learn
The problem occurs when copying a pst file, use by Outlook 2003. The file is open by Outlook, and when using CopyFile, an error pops out, saying that a part of the file is in use by another process. I know that if I close the file the copy will be succesful, but I want to learn how to handle this situation.
I can't "capture" that error with the Err object because this error doesn't modify it. Generally, with a general runtime error, the console says something as "Microsoft VBScript Runtime Error: " and then explains the error. But in this specific error, it says <null>:explanation.
How could I handle this error? Is there a way to check if a file is open?
Thanks in avance
EDIT: This is basically the code and the instructions i use:
Obvioulsy this isn't the whole script, it's just the part in which the error comes out. The file to to copy exists (it is in use by Outlook), and the folder C:\backup also exists.
< Message edited by jjfevs -- 4/12/2007 4:27:19 AM >