Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple backup vbs code - Stopped working

Status
Not open for further replies.

usmcratman

Technical User
Aug 17, 2009
1
0
0
US
For the past few years I have used the following vbs script to perform a simple archive on files. After several updates earlier in the year, they quit working. Gives me the error "can't create object 'Scripting.FileSystemObject', error code: 800A01AD
I really havent had time to seriously research the issue until today.

The most prominent updates on my WinXP Pro system are SP3, "Windows Power Shell 1.0", and all the .net framework updates. I think that one of them may be the culprit. Is there a better way to write this simple code, or does anyone know what may be causing the error.

Code:
[!]Dim fso
set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "C:\Data Files\Databases\Case Management.mdb", "L:\DB Backups\Case Management (" & Replace(FormatDateTime(Date(),2),"/","-")  & " " & Replace(FormatDateTime(Time(),4),":","") & ").bak"
set fso = nothing[/!]

Thank you,
JR


Semper Fi
 

Have you tried VB native
Code:
FileCopy [i]source, destination[/i]


Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top