Home
Developer Blog
Ajax effects
CSS examples
Freelance jobs
Hot IT Jobs
Hot scripts
Code samples
Web hosting directory
Lotus Notes FAQ
See the new scripts recently added to Dynamic Drive.
Click here
.
Original, practical
CSS codes and examples
such as CSS menus for your site.
Search code samples
Keyword
All Categories
ASP
CSS
Dhtml
Html
Javascript
PHP
Code Samples
ASP
CSS
Dhtml
Html
Javascript
PHP
LOGIN HERE
Username
Password
Signup Now
Forgot Password
Verify Signup
ASP >> Objects
How do I copy a file using FSO?
Visitor Ratings (0) :
Description
Call the following function:
StrFileSource - path to file you want to copy, & StrFileDestination - path that file destination
Code
Select All
function CopyFile(strFileSource, strFileDestination, strError) if strFileSource = "" OR strFileDestination = "" then strError = "Error - You must supply both a source and a destination" exit function end if set fso = Server.CreateObject("Scripting.FileSystemObject") if Not fso.FileExists(strFileSource) then strError = "Error - Source file does not exist" exit function end if if strError = "" then Set f2 = fso.GetFile(strFileSource) f2.Copy(strFileDestination) Set f2 = nothing end if Set fso = nothing end function
Rate this Resource
0
1
2
3
4
5
6
7
8
9
10