..


Sponsored Links

CopyFile

The CopyFile method copies one or more files from one place to another. This method accepts three parameters:

  • source - the file or files to be copied (wildcards can be used);
  • destination - the destination path where to copy the file or files;
  • overwrite - is an optional parameter, is expressed with a Boolean value that specifies whether an existing file can be overwritten or not. True allows files to be overwritten. False prevents you from overwriting files. The default is True
Here's an example:





 Dim fs







 'I create the FileSystemObject







 Set fs = Server.CreateObject ("Scripting.FileSystemObject")









 'I copy the file page.html to a backup folder hypothetical







 fs.CopyFile "c: \ www \ mysite \ page.html", "c: \ backup \ page.html"









 'I cleaned







 Set fs = nothing



In our example, the third parameter (overwrite) was omitted.

In the same category ...
E-Learning
ASP (Advanced) ASP (Advanced)
Full course for creating dynamic Web sites. From 39 €.
ASP Zero (Ebook) ASP Zero (Ebook)
Learning Microsoft ASP and VBScript from scratch. At only 29 €.
ASP and Access (Ebook) ASP and Access (Ebook)
Managing a MS Access database with ASP. At only 29 €.
Sponsored Links