Just a quick question for all. I'm writing a script with a function (listed below) using VBS that will copy a 1.7GB file from one server to another server on our network for processing. We have a batch file in place at the current moment that I'm going to replace with the new script. While the batch file works, the problem is that I have operators that need to run secondary processes once the copy is complete and with the batch file, they have no way of knowing how long the file takes to transfer other then waiting an appropiate length of time.
What I'm trying to figure out a simple way of writing to a command window (shell out I suppose) letting the operators know the status of the cop, if the copy is still running or for that matter if it is completed. Is there a way that I can write to a command window from inside my function (listed below) that will allow me to create some kind of generic message stating that the process is still running or that it is complete?
set fso = CreateObject("Scripting.FileSystemObject")
FileToBeCopied = "C:\Temp\temp\test123.txt"
CopyLocation = "C:\Temp\test123.txt"
'Time to check for the file
if fso.FileExists(FileToBeCopied) = True then
set temp = fso.getfile (FileToBeCopied)
fso.copyfile FileToBeCopied, CopyLocation
response.write "File has been copied. <-- will not write to a command window.
Set temp = fso.getfile (FileToBeCopied)
response.write "Original File Deleted"