I've got a script that opens a Robocopy job. It opens a command console window and will only close when job is complete. That is fine, but is there a way to display what I am copying in the title of the console window?
Here's the code:
strPackage = InputBox("Please enter package name:")
Do While strPackage = ""
MsgBox "Please enter package name to proceed!"
strPackage = InputBox("Please enter package name:")
Loop
strSourceFolder = InputBox("Please enter source path:")
Do While strSourceFolder = ""
MsgBox "Please enter source path to proceed!"
strSourceFolder = InputBox("Please enter source path:")
Loop
strDestFolder = InputBox("Please enter destination path:")
Do While strDestFolder = ""
MsgBox "Please enter destination path to proceed!"
strDestFolder = InputBox("Please enter destination path:")
Loop
strSource = strSourceFolder & "\" & strPackage
strDest = strDestFolder & "\" & strPackage
dim oExec, WshShell
strParameters = chr(34) & strSource & chr(34) & chr(32) & chr(34) & strDest & chr(34) & chr(32) & "/E /V /ETA"
Set WshShell = wscript.createobject("wscript.shell")
Set oExec = WshShell.Exec ("C:\WINDOWS\system32\Robocopy.exe" & chr(32) & strParameters)
set WshShell = nothing
MsgBox "ATTENTION: Do not close console window! The window will close when copy of " & strPackage & " is complete.
Here's the code:
strPackage = InputBox("Please enter package name:")
Do While strPackage = ""
MsgBox "Please enter package name to proceed!"
strPackage = InputBox("Please enter package name:")
Loop
strSourceFolder = InputBox("Please enter source path:")
Do While strSourceFolder = ""
MsgBox "Please enter source path to proceed!"
strSourceFolder = InputBox("Please enter source path:")
Loop
strDestFolder = InputBox("Please enter destination path:")
Do While strDestFolder = ""
MsgBox "Please enter destination path to proceed!"
strDestFolder = InputBox("Please enter destination path:")
Loop
strSource = strSourceFolder & "\" & strPackage
strDest = strDestFolder & "\" & strPackage
dim oExec, WshShell
strParameters = chr(34) & strSource & chr(34) & chr(32) & chr(34) & strDest & chr(34) & chr(32) & "/E /V /ETA"
Set WshShell = wscript.createobject("wscript.shell")
Set oExec = WshShell.Exec ("C:\WINDOWS\system32\Robocopy.exe" & chr(32) & strParameters)
set WshShell = nothing
MsgBox "ATTENTION: Do not close console window! The window will close when copy of " & strPackage & " is complete.