Files
Takes 5 parameters, FieldBase, Destination, Action, Source, IfLenFld
Usage:
FieldBase, Destination, Action, Source, IfLenFld
[WorkWith], Destination, Action, Source, IfLenFld
[WorkWith], Destination, Action, Source, [""]
[WorkWith], Target, Action, [""], [""]
FieldBase, Destination, Action, Source, [WorkIf]
[WorkWith], Destination, Action, Source, [WorkIf]
[WorkWith], Target, Action, [""], [WorkIf]
Description:
The Files Work Query command will allow for all the basic, and some more advanced file manipulation to be performed in bulk using data from the Work Query.
- Load (Destination is a field name, Source is the File to load. This is the same as Text "LoadFile" but has per-record error reporting.)
- Save (Destination is the File to save to, Source is a field name or text value. This is the same as Text "SaveFile" but has per-record error reporting.)
- Append (Destination is the File to save to, Source is a field name or text value. This is the same as Text "SaveFile" but has per-record error reporting.)
- Copy
- Move
- Rename
- Delete (Target is the File to delete; don't use Source)
- SetTimes
- Destination is the File Name to set the Times for
- Source may be blank or omitted to auto-select one or more fields named Created, Modified, or Accessed that exist in the Work Query
- If Source is specified, it must include one or more of the following space-separated field names: "Created Modified Accessed"; file times for field names not listed will not be set even if those fields exist in the Work Query
- This Action is disabled by default and must be enabled in the Moxie.cfg file.)
If the Work Query field Error does not already exist when this command is run, it will be created. For any errors that occur per record, the error message for each record will be placed in the Error field.
See Also:
ListFiles, which retrieves file times that are compatible with SetTimes.
Example:
Delete all .png files in a folder:
ListFiles pFolder, "*.png", ""
Files "Name", "Delete"