I have a batch file I got from somewhere that runs a backup. The file
contains the following lines:
copy "c:\documents and settings\administrator\local settings\application
data\microsoft\windows nt\ntbackup\data\*.log" "c:\backup\backlog.txt"
del "c:\documents and settings\administrator\local settings\application
data\microsoft\windows nt\ntbackup\data\*.log"
As you probably know, when ntbackup creates a report, it increments the
name. Since the last line of the code deletes all files with the .log
extension, when the batch runs again, the only log file in the folder is the
one for that backup job. That said, how is it possible that it can copy the
file using the wildcard and save it as backuplog.txt?
What I am trying to do is do this within a vbscript. I cant seem to do it
using CopyFile, so I tried to do it via a WScript.shell leaving me with the
following command:
Return = shell.Run ("copy ""c:\documents and settings\administrator\local
settings\application data\microsoft\windows nt\ntbackup\data\*.log""
c:\backup\backlog.txt""")
This code does not work. It keeps telling me that it cannot find the file
specified. Is this because the syntax of my quotation marks is wrong. When I
run the command from the command line, it works, just not from the script.If
I cannot make the line work, is there any way I can CopyFile to make it
work?
I appreciate the help.
Chris