| Object: | SoftArtisans.SAFile |
| Syntax: | SaveInVirtual ([in] VirtualLocation) |
| Description: | This method saves an uploaded file to the web server's hard
disk in a location specified by the virtual directory or filename in a virtual directory. SaveInVirtual uses ASP's intrinsic Server.MapPath function. As with the MapPath function, you can specify either a virtual directory or a filename. If you specify a filename, it will be resolved in the current virtual directory. The Web Administrator can disable all other save methods except SaveInVirtual. This prevents the Web Developer from writing to non-virtual directory locations on the server. See Disabling If there is more than one file being uploaded in a single page, only the first one is saved. To save multiple files in a single upload, there is an equivalent method for each file object, i.e., upl.Form("FILE1").SaveInVirtual "filename". See also the SaveInVirtual method for the SAFileUp object. |
<%
Set objFile = Server.CreateObject("SoftArtisans.SAFile")
objFile.Path = "C:\Temp\"
objFile.Create "Yes.txt"
If 1 <%>% 2 Then
objFile.SaveInVirtual "/BadApps/No.txt"
Else
... %>
| Previous Page | Next Page |