We help IT Professionals succeed at work.

VB Script question

xSinbad
xSinbad asked
on
Medium Priority
202 Views
Last Modified: 2010-05-02
Does anyone know if VBS has a Shell like function and a filecopy like function, if not is there a good work around?

Cheers
Marcus
Comment
Watch Question

Commented:
For the Shell function, use:

Dim x
Set x = CreateObject("WScript.Shell")
x.Run chr(34) & "C:\Program Files\Internet Explorer\IEXPLORE.EXE" & chr(34) & " www.experts-exchange.com"

For the filecopy function, use:

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "C:\temp\test.txt", "C:\temp\test2.txt"

Commented:
To explain, vbs does not have these features built in, however the scripting components do have this functionality, you just need to access the appropriate class libraries.

Author

Commented:
Thanks Paul

Commented:
Happy to help a fellow expert Marcus. :)  Thanks for the points.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.