Persits Software, Inc. Knowledge Base Articles

The filename, directory name, or volume label syntax is incorrect

Problem Description

When trying to call the Save method of the AspUpload component with an HTTP URL as an argument, the following error is generated:

Persits.Upload.1 error '800a0005' The filename, directory name, or volume label syntax is incorrect.

Solution

The Save method of the AspUpload component only accepts physical paths, not URLs.

' Incorrect: URLs not allowed
Upload.Save "http://server/directory"

' Correct: local path
Upload.Save "c:\upload"

' Correct: UNC path
Upload.Save "\\server\share\dir"

' Correct: virtual folder
Upload.SaveVirtual "/Dir"