Move (UploadedFile Object)
Call this method to move files which have been saved to disk to a specified destination on the server.
Syntax
UploadedFileObject.Move(Path As String[, FailIfExsists As Boolean = True])
The Move method syntax has the following part(s):
Part |
Description |
Path |
The full pathname of the destination (including the filename). If you saved uploaded files to disk using a virtual directory then this argument must also use a virtual directory. |
FailIfExsists |
If TRUE then an exception will be thrown if the file already exists at the destination folder. Defaults to TRUE. |
Remarks
An exception is thrown if the operation fails. Trap for success/failure by examining VBScript's Err object immediately after calling this method (the Number property of the Err object will be a non-zero value if it failed). MAKE SURE that you have enabled inline error trapping by using an On Error Resume Next statement at the beginning of the ASP page.
An exception will also be thrown if the Files collection was populated by using the SaveToMemory method.
You must use a virtual directory for the Path argument if a virtual directory was used in the Save method call (i.e. the UseVirtualDir property was set to TRUE before calling the Save method). The syntax for the Path argument would then be: "/VirtualDir/AnyOtherDirs/FileName".
See Also: Copy | Delete | Save