
translating from vba to vbscript
You have to use the CreateObject method to get an instance of the
Filesystem object. Then use the CopyFile method of the FSO to copy the
file. So your code would look like this
sub copy_file()
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.copyfile "c:\folder\text.doc", "d:\folder\text.doc"
end sub
==============================
Steve Seguis
www.scripthorizon.com
==============================
Quote:
-----Original Message-----
Posted At: Monday, June 12, 2000 9:55 AM
Posted To: vbscript
Conversation: translating from vba to vbscript
Subject: translating from vba to vbscript
Hi!
in VBA I have this procedure:
sub copy_file()
FileCopy c:\folder\text.doc, d:\folder\text.doc
end sub
How would that translate in VBScript since <FileCopy> does not seem to
be a
valid statement in VBS?
Thanks all!
Robert