junebuggie
Programmer
I am attempting to create a vbscript which will enable user to right-click on files and copy them to another directory. The code below works, but a message box pops up for each file that is copied. How can I change it to only display one message box even if several files are copied?
Any help would be very appreciated!
--June
----------------------------------
set collArgs = WScript.Arguments
if collArgs(0) <> "" then
set fso = createobject("scripting.filesystemobject"
fso.CopyFile collArgs(0), "c:\Temp\"
msg = "File Copied!" & vbcrlf & vbcrlf
msg = msg & "Don't forget to restart any" & vbcrlf
msg = msg & "currently running applications."
msgbox msg, VBInformation, "Right Click Copier"
end if
----------------------------------
Any help would be very appreciated!
--June
----------------------------------
set collArgs = WScript.Arguments
if collArgs(0) <> "" then
set fso = createobject("scripting.filesystemobject"
fso.CopyFile collArgs(0), "c:\Temp\"
msg = "File Copied!" & vbcrlf & vbcrlf
msg = msg & "Don't forget to restart any" & vbcrlf
msg = msg & "currently running applications."
msgbox msg, VBInformation, "Right Click Copier"
end if
----------------------------------