Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Problem copying pst files

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,45739
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Problem copying pst files
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Problem copying pst files - 4/12/2007 3:34:24 AM   
  jjfevs

 

Posts: 2
Score: 0
Joined: 3/16/2007
Status: offline
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 >
 
 
Post #: 1
 
 RE: Problem copying pst files - 4/12/2007 4:08:53 AM   
  Country73


Posts: 735
Score: 10
Status: offline
Please post the code that you are using and someone out here will be able to assist you in your Error Checking.

(in reply to jjfevs)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Problem copying pst files Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts