LostInWindows
asked on
File Copy/Move using vbs
I am trying to do some regular file management using vbs.
I am not very proficient in vb script but I am missing something here.
I have a script that needs to accomplish this:
Using Existing Directory d:\Backups
Create a sub folder called YYDDMM
Copy a file called D:\QuickBooks\Daily\*.QBB to D:\Backups\YYDDMM\
I can do everything except the last line. When I use a msgbox it shows that my destination path is blank.
Can you advise what is missing or wrong in this script?
It continuously fails on line 58 saying
"Invalid attempt to call Exec without a command".
QBBackupFileManagement.vbs
I am not very proficient in vb script but I am missing something here.
I have a script that needs to accomplish this:
Using Existing Directory d:\Backups
Create a sub folder called YYDDMM
Copy a file called D:\QuickBooks\Daily\*.QBB to D:\Backups\YYDDMM\
I can do everything except the last line. When I use a msgbox it shows that my destination path is blank.
Can you advise what is missing or wrong in this script?
It continuously fails on line 58 saying
"Invalid attempt to call Exec without a command".
QBBackupFileManagement.vbs
ASKER
Thanks,
Line 56 which says: fso.CopyFile (sSourceFile, sBackupPrefix)
I get an error message saying "Cannot use parenthesis when calling a sub"
Line 56 which says: fso.CopyFile (sSourceFile, sBackupPrefix)
I get an error message saying "Cannot use parenthesis when calling a sub"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, I really appreciate it!
Welcome, thanks for the feedback.
~bp
~bp
Open in new window
~bp