File

Takes three parameters, Destination, Action, Source

Usage:

Destination, Action, Source
Target, Action, [""]

Description:

The File Top Query command will also allow for non-Work Query based execution, performing the single operation specified.

List of Actions:

If the Top Query field Error does not already exist when this command is run, it will be created. If it does exist, it will be cleared before the specified Action is run. If an error occurs, a runtime error will be thrown, which may be caught with a Try/Catch block and the error string can be inspected or reported using the Top Query Error field.

See Also:

LoadFile$ function and the SaveFile command.

Examples:

[Pull] Req.HasFile Req.FileName UploadFile

If Req.HasFile
Try
   File ("Public/Docs/" & UploadFile), "Copy", Req.FileName
Catch
    HtmlErr ("Sorry, we found an error: " & Error)
End Try
Else
SaveFile ("Public/Docs/" & UploadFile), UploadFile
End

File (folderPath & "/" & New.File.Name), "Rename", (folderPath & "/" & Old.File.Name)