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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Console window message - how to?

Status
Not open for further replies.

vajpowb

Technical User
Jan 18, 2008
16
US
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.
 
No, you cannot.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top