File Action
The activity allows you to perform basic operations on the document: Copy, Move, Rename, Delete, Make directory.
Depending on the selected action to be performed, appropriate text fields to be filled in will appear in the activity window:
-
- when copying and moving documents, fill in the Source and Destination fields with the full path (e.g. Source: C:\Kvasir\The-Art-of-War.pdf; Destination: C:\Users\[user_name]\Desktop\The-Art-of-War.pdf); tick the box to choose overwriting existing file when needed; when folder pointed in Destination does not exist – Wizlink® creates it; you can use wildcards in Source textbox (so to move all files to another folder you have to write C:\[directory_tree]\*.*);
- when renaming documents, fill in the Path and New name fields (e.g. Path: C:\Kvasir\The-Art-of-War.pdf; New name: TheArtofWar.pdf);
- when deleting documents, fill in the Path field (e.g. C:\Kvasir\TheArtofWar.pdf); you can use wildcards in Path textbox (e.g. C:\Kvasir\*.pdf deletes all PDF files from Kvasir folder);
- when making directory, fill in the Path field with the address followed by the name of the directory you want to create (e.g. C:\Mimir).
Parameter name | Parameter Type | In/Out | Description |
---|---|---|---|
Action | Dropdown | Input | select the action to perform from the dropdown list |
Alternative Scenario If Failed | Boolean | Input | checkbox; default is "on" |
Destination | String | Input | full path to the file |
DisplayName | Literal | Input | you can change the name of activity for greater clarity of the scenario |
NewName | String | Input | new name of the file, localization is in File Path (used in: rename) |
Overwrite Existing File | Boolean | Input | checkbox; default is "off" = file will not be overwritten |
Path | String | Input | full path to a folder (D:\directory_tree\) |
Source | String | Input | full path of the file |
Result | Boolean | Output | returns the Boolean value: it will return True if no error is in activity, otherwise it will return False |
Result Code | Int32 | Output | Result Code will return 0 if there is no error in activity, otherwise in most cases it will return 1, the extended result code will show only in several chosen activities |