View Full Version : File copy
Fireengine
06-30-2001, 05:32 PM
Is it possible to write a script in VBasic which would copy a file from one location to another?
RWSchlatter
07-02-2001, 01:41 AM
now J have a question - Visual Basic - or VBScript ?
for VBScript:<pre>' VBScript.
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile "c:\COMPlusLog.txt", "c:\x\"</pre>and if you do not have the current Help file for Windows Scripting Host, please download it from:
http://msdn.microsoft.com/scripting (http://www.winguides.com/external.php?url=http://msdn.microsoft.com/scripting)
especially the WSH5.6beta has a very good help file.
______________
Regards - Richard
Fireengine
07-02-2001, 05:07 PM
Thanks for the reply.
I meant VBscript.
When copying multiple files, is there a way I can have a display or view of the files being copied (in a message box or something)when I use the fso.CopyFile method?
prasad
07-10-2001, 03:56 PM
You can use WScript.Echo method in WSH or MsgBox function in VBScript to display the name of the file being copied.
darkness
07-10-2001, 09:59 PM
Store the location in a variable before calling the copyfile option then you could just display the variables content's before or after the copy.
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.