File SearchThis activity allows you to automate searching a file or list of files available in a folder or network drive on the system. Using the file name, this activity recursively searches for the specified file(s) and stores the search result in an Excel file. You can perform the search based on the filters applied to the file parameters such as size, type, creation and modification date. Using File Search Activity1. In the Canvas Tools pane, click File to expand the tool and view the associated activities. 2. Drag the File Search activity and drop on to the Flowchart designer on the Canvas. The validation error symbol disappears when required inputs are provided.
3. In the Search Path list, select the parameter holding the source path where file search needs to be performed. For example, D:\Data. You must define the parameter in the Parameter bar to store the value and make it available for the selection. 4. In the Search Pattern list, select the parameter holding the file format condition to search the file. You must define the parameter in the Parameter bar to store the term and make it available for the selection. The supported formats for the search pattern are: § To search a particular file, provide the pattern as; <file name.file extension>. For example, output.xlsx. § To capture all files from a particular folder; provide the pattern as, <*.*>. § To search and capture all the files with a particular file extension; provide the pattern as, <*.file extension>. For example, *.pdf. § There could be more advanced search patterns depending upon your requirement such as, search all pdf files with a file name starting with 'A'. In such case, provide the pattern as <A*.pdf>. 5. In the Output Excel File Path list, select the parameter holding the path along with the excel file name and file extension to store the list of searched files . You must define the parameter in the Parameter bar to store the value and make it available for the selection. 6. In the Recursive Search list, select true to search for the required file in the sub directories or sub folders of the source path. By default, the value is set to false. 7. Click Advanced Search to expand and set the advance search options.
8. In the File Size limit in KB list, select the parameter holding the upper limit of the file size in KB. The files that are less in size than the specified file size are considered for the search. You must define the parameter in the Parameter bar to store the value and make it available for the selection. 9. In the Creation Start Date list and Creation End Date list, select the parameters holding the date of file creation for searching the files created in the specified date range. For example, if the date specified for the Creation Start Date and Creation End Date is 06/21/2017 and 08/21/2017 respectively, then the process searches for the files created between 21st June 2017 and 21st August 2017. You must define the parameter in the Parameter bar to store the value and make it available for the selection. 10. In the Modified From Date list and Modified To Date list, select the parameters holding the date of file modification for searching the files modified in the specified date range. For example, if the date specified for the Modified From Date and Modified To Date is 11/15/2017 and 12/15/2017 respectively, then the process searches for the files modified between 11th December 2017 and 12th December 2017. You must define the parameters in the Parameter bar to store the values of the respective fields and make it available for the selection. 11. Click the Result Mapping link. The Output Mapping list appears. Select the available parameter to map the status of the file operation performed. Both Boolean and String type is supported. You must pre-define the parameter to make it available for the selection. If the operation is successful, it returns true and if the operation fails it returns false. It can be used as an input for the next action that you want to perform in the automation process workflow, depending upon the success or failure of the file operation performed. The File Search activity with a default name is created. File Search PropertiesThe properties of File Search activity are listed in the following table and can be edited in the Properties grid on the right pane.
|
On This Page Hide
Related Topics |