This is an old revision of the document!
This page describes the use of the “File Operations” tool in Bizweaver. Information regarding the associated File Reader and File Writer tools is found in separate documents.
The File Operations tool provides four standard Windows file operations and one operation specific to Bizweaver. The fields displayed in the File Operations tool will change depending on the function.
The standard Windows operations are Get, Copy, Move, and Delete.
The Copy and Move operations function in the same way and are configured in the same manner.
Use either the Copy or Move operations to rename a file. Make the target file name the new name, and this will effectively rename the file.
When using the Bizweaver functions to rename a file, you must use the file's extension in the name e.x. If a file had the name of File.pdf using $N#.pdf in the file name, it would rename it as File1.pdf, but the file's extension needs to be used, or the renaming won't take effect. Below is a description of the fuctions.
$N - Old file name without extension. # - Assigns next available number if file exists with the same name.
Example: source file name = myfile.xml and target specified as $N_####.xml then the target will be renamed as myfile_0001.xml adding a new number for each subsequent file.
File Handler also has a special function called Get Files. This operation is used to define multiple files (using * as wildcard) to be processed through subsequent workflow steps. The function can also reference a specific file.
The Get Files operation is most often used in conjunction with the Bizweaver “looping” function. In this process, the Get Files step creates a list of files, which is the input to the looping process. Whatever actions are needed are defined between the Loop and LoopEnd steps. These actions are performed for each file in the Get Files list. See the Looping Tool page for more information on this process. The advantage of using this approach is that there is no need to use other tools to determine if files exist. If no files are found for processing, the workflow will end.
There are several variables from the File Operations function that can be used in other workflow steps. In the following examples, the file being addressed is named “FileName.txt” and it is found in the folder “C:\SourceFolder”.
| Variable Name | Explanation | Example |
|---|---|---|
| File Name | Full file name including path (folder) | C:\SourceFolder\FileName.txt |
| File Title | The file name including the extension | FileName.txt |
| File Title without Ext | The file name without the extension | FileName |
| File Extension | The file extension including the “.” separator | .txt |
| File Type | File type such as TAB, csv, etc. | |
| Source Path | Path of the source file | C:\SourceFolder |
| Source File Name | “File” name as defined in a Get Files action | Example: “*FileName.txt” |
| Target Path | Path name from a File Writer operation | C:\TargetFolder |
| Target File Name | “File” name as defined in a File Writer action | Example: “*FileName.txt” |