— File Processing Plugin
— Reading Data from a File.
Parameters:
— Writing Data to a File
Parameters:
— Deleting a File.
Parameters:
— Moving a File.
Parameters:
Path - the path to the file.
Path for move - the new path to the file.
— Coping a File.
Parameters:
Path - the path to the file.
Path for copy - the path to the file copy.
— Renaming a File.
Parameters:
Path - the path to the file.
New path - the path to the file with the new name.
— Reading a List of Files.
Parameters:
Files list read - the list of files to be copied to the parameters specified.
Example: file path 1 => parameter name 1; file path 2, file path 3, file path 4 => parameter name 2
The contents of «file path 1» will be copied to the parameter specified as «parameter name 1»
The contents of «file path 2», «file path 3», and «file path 4» will be copied to the parameter specified as «parameter name 2»
The data is written to the parameter as a dictionary:
//synchronous work with the parameter
var data1 = processInstance.GetParameter<Dictionary<string, string>("parameter name 1");
//asynchronous work with the parameter
var data2 = await processInstance.GetParameterAsync<Dictionary<string, string>("parameter name 2").ConfigureAwait(false);
Parameter purpose - read about parameter purpose.
Identify by full name - the flag to set the path:
Adding files with the same name to the dictionary throws an exception.
Parameter type - read about parameter type.
List files mode - read about file mode.
List files access - read about file access.
List files share - read about file share.
Buffer size - the buffer size for data reading; set as a positive integer; the default buffer size is 4096.
— Deleting a List of Files.
Parameters:
Files list delete - the list of the paths of the files to be deleted, separated by commas.
Example: file path 1, file path 2
The files with «file path 1» and «file path 2» will be deleted.
— Moving a List of Files.
Parameters:
Files list move - the list of the current paths and new paths Example: file path 1 => path for move 1, file path 2 => path for move 2
The file with «file path 1» will be moved to «path for move 1», The file with «file path 2» will be moved to «path for move 2».
— Copying a List of Files.
Parameters:
Example: file path 1 => path for copy 1, filePath2 => path for copy 2.
The file with «file path 1» will be copyied at «path for copy 1», The file «file path 2» will be copyied at «path for copy 2».
— Renaming a List of Files.
Parameters:
Example: file path 1 => file new path 1, file path 2 => file new path 2.
The file with «file path 1» will be renamed and moved to «file new path», The fie with «file path 2» will be renamed and moved to «file new path 2».
— Creating a Directory.
Parameters:
— Deleting a Directory.
Parameters:
Path - the folder path to be deleted.
With files and sub directory - the flag to delete subfolders and files:
— Moving a Directory.
Parameters:
— Copying a Directory.
Parameters:
Path - the folder path to be copied.
Copy path - the new folder path.
Sub directory - the flag to copy subfolders:
Mask sub directories - the mask for subfolders. Only the subfolders matching this mask will be copied. Read about masks.
Mask files - the mask for files. Only the files matching this mask will be copied. Read about masks.
— Renaming a Directory.
Parameters:
— Getting a List of Files in Directory.
Parameters:
Directory get files - the list of the directories whose files to be listed into the parameters specified.
Example: path 1 => parameter name 1; path 2, path 3, path 4 => parameter name 2.
The files from the folder «path 1» will be added to the parameter specified as «parameter name 1».
The files from the folders «path 2», «path 3», and «path 4» will be added to the parameter specified as «parameter name 2».
The data is written to the parameter as a dictionary:
//synchronous work with the parameter
var data1 = processInstance.GetParameter<Dictionary<string, string>("parameter name 1");
//asynchronous work with the parameter
var data2 = await processInstance.GetParameterAsync<Dictionary<string, string>("parameter name 2").ConfigureAwait(false);
Parameter purpose - read about parameter purpose.
Identify by full name - the flag to set the path:
Adding files with the same name to the dictionary throws an exception.
Sub directory - the flag to copy subfolders:
Mask sub directories - the mask for subfolders. Only the subfolders matching this mask will be copied. Read about masks.
Mask files - the mask for files. Only the files matching this mask will be copied. Read about masks.
— Getting a List of Subdirectories in Directory.
Parameters:
Directory get directories - the list of the directories whose subdirectories to be listed into the parameters specified.
Example: path 1 => parameter name 1; path 2, path 3, path 4 => parameter name 2.
The subdirectories of the folder with «path 1» will be added to the parameter specified as «parameter name 1».
The subdirectories of the folders with «path 2», «path 3», «path 4» will be added to the parameter specified as «parameter name 2».
The data is written to the parameter as a dictionary:
//synchronous work with the parameter
var data1 = processInstance.GetParameter<Dictionary<string, string>("parameter name 1");
//asynchronous work with the parameter
var data2 = await processInstance.GetParameterAsync<Dictionary<string, string>("parameter name 2").ConfigureAwait(false);
Parameter purpose - read about parameter purpose.
Identify by full name - the flag to set the path:
Adding files with the same name to the dictionary throws an exception.
Sub directory - the flag to copy subfolders:
Mask sub directories - the mask for subfolders. Only the subfolders matching this mask will be copied. Read about masks.
— Compressing a Directory.
Parameters:
Archive path - the path to the archive.
Directory path - the folder path to be compressed.
Sub directory - the flag to copy subfolders:
Mask sub directories - the mask for subfolders. Only the subfolders matching this mask will be copied. Read about masks.
Mask files - the mask for files. Only the files matching this mask will be copied. Read about masks.
Archive type - the archive type. Read about archive type.
— Compressing a List of Files.
Parameters:
Example: file path 1, file path 2.
The archive containing the files with «file path 1» and «file path 2» will be created.
— Uncompressing.
Parameters:
— Checks if a File Exists.
Parameters:
— Checks if a List of Files Exists.
Parameters:
Example: file path 1, file path 2.
The files with «file path 1» and «file path 2» will be checked for existense.
— Checks if a Folder Exists.
Parameters:
— File Purpose.
Temporary Parameter exists from the time of its conveying to a process, or its setting within a process, till the end of the transition process. In other words, if you convey Parameter with Purpose = Temporary to the process through Command, it will be possible to obtain its Value only until the process stops and begins waiting for another Command.
Persistence Parameter is stored in a database in the WorkflowProcessInstancePersistence table (or object). Its Value may be accessed at any time after it has been set. The third type of Purpose is a system one.
System Parameters cannot be created; they are used by Workflow Engine for its proper operation. You may access them trough the ProcessInstance object. These Parameters will be discussed in detail further on.
— File Data Type to Be Read.
The data will be saved as a string. Use this type when working with a text file.
The data will be saved as a Byte array. Use this type when working with a non-text file.
— Mask to Search for Files and Folders.
File masks can consist of any combination of the following elements:
Letters, numbers and other characters allowed in file names.
Represents any single character.
Represents any sequence of characters (including no characters at all).
File Mask | Description & Examples |
---|---|
* | Matches all files containing any amount of characters, with or without extensions (e.g., entering A* would match any file or folder starting with the letter A followed by any amount of characters). |
*.* | Matches all files containing any amount of characters and with any extension. Even matches files that don't have an extension (e.g., entering A*.* would match any file starting with the letter A followed by any amount of characters along with any extension). |
? | Matches any single character (e.g., entering A? would match any file starting with the letter A followed by any single character). |
*.png | Matches all files with names containing any amount of characters with a .png extension (e.g., image_name.png, cool_pic.png, 1.png). |
*.p* | Matches all files with names containing any amount of characters with an extension starting with the letter p (e.g., document.pdf, image_name.png, business.project, 1.ppt) |
pic*.* | Matches all files with names that start with pic (e.g., picture_name.png, pictogram.ico, picker.html, pic). |
*mat?.html | Matches all .html files with names starting with any sequence of characters, followed by the string mat, and ending with a single character (e.g., automate.html, mate.html, tomato.html). |
?????? | Matches all files with names containing six characters and without an extension (e.g., 123456, myFile, my_pic, images) |
doc?????.pdf | Matches all .pdf files with names that start with doc followed by any five characters (e.g., document.pdf, doctrine.pdf, doc_1234.pdf). |
file1.txt|file2.jpg|file3.png | Matches specific filenames or wildcard masks that reside in the same directory (e.g., c:\temp\file1.txt |
c:\temp1*.txt | c:\temp2*.png |
The most common compression file format used in Windows operating systems.
The most common compression file format used in Linux and Mac OS operating systems.
concatenation with the conjunction operation.
concatenation with the disjunction operation.