Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying a File using Scripting.FileSytemObject

Status
Not open for further replies.

mcm103

Technical User
Sep 28, 2001
20
0
0
US
I am creating an ASP page that will allow a user to upload a file from their local drive and copy it to a subfolder on a webserver. I am running into problems when the parent folder's name contain a space ie(My Documents).

My code is:

Set FileObject = CreateObject("Scripting.FileSystemObject")
Set SourceFile = FileObject.GetFile(request.form("MyFile"))

* Request.form("MyFile") is the contents of the file Input Box from the asp page.

This is the error I receive on the the second set

Error Type:
Microsoft VBScript runtime (0x800A0035)
File not found

Is there a work around for the spaces?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top