View Full Version : File copy
06-30-2001, 06:32 PM
Is it possible to write a script in VBasic which would copy a file from one location to another?
07-02-2001, 02:41 AM
now J have a question - Visual Basic - or VBScript ?
for VBScript:<pre>' VBScript.
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:
especially the WSH5.6beta has a very good help file.
Regards - Richard
07-02-2001, 06: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?
07-10-2001, 04:56 PM
You can use WScript.Echo method in WSH or MsgBox function in VBScript to display the name of the file being copied.
07-10-2001, 10: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.