Copy over File System Object
Hi,
I want to copy a file from a Folder to another Folder using the File System Object in ASP, but I just don't know how to do that. May someone help me with that?
I tried with no success:
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objDriveC = objFSO.GetDrive("C:")
Set objRoot = objDriveC.RootFolder
Set objFolder = objFSO.GetFolder("C:\inetpub\wwwroot\CCA")
For Each objFile in objFolder.Files
If objFile.Name = "meu.asp" Then objFile.Copy (C:\inetpub\wwwroot\CCA\2\",True)
Next
What else should I do?
Thanks for the Help.
|