Documentation

FileHandler function

This function is used to handle certain request like watch a folder for certain time, verify the particular text in a file, copy a file file from source to destination, remove a file file from certain folder and many other operations related to files.

Watch Command

Watch command under FILEHANDLER function is used to watch a file of given type in a particular folder and returns the path of the file.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as Watch, provide target folder, extension, prefix, timeout, orderby and track.

Here, folder is path of the folder to watch extension is the file extension which we are trying to watch like txt, pdf or CSV prefix is any string before the file name timeout is the timeout value in seconds order by is way of filtering the files and you can use date, size or name track is either ascending or descending

Copy Command

Copy command under FILEHANDLER function is used to copy one file to another folder i.e.. from source to destination.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as copy, provide source file, destination folder and select if you want to overwrite existing file or not.

If the file is copied successfully in the destination folder, it will return true else it will return false in a variable defined in Element Key.

Delete Command

Delete command under FILEHANDLER function is used to delete a particular file from a specified location.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as delete and provide file path in file.

If file is deleted successfully, it will return true else it will return false in a variable defined in Element Key.

Verify Text Command

VerifyText command under FILEHANDLER function is used to verify if the given text is present in the file or not.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as verifytext, provide file path in file and text to be checked in text field.

If the given text is found in the file successfully, it will return true else it will return false in a variable defined in Element Key.

Rename Command

Rename command under FILEHANDLER function is used to rename a particular file.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as rename, provide file path in file and name which should come after rename in fileAfterRename field.

If the file is renamed successfully, it will return true else it will return false in a variable defined in Element Key.

Get File Name With Extension Command

GetFileNameWithExtension command under FILEHANDLER function is used to get the file name with file extension.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as getFileNameWithExt and provide file path in file.

File name with extension will get stored in a variable defined in Element Key.

Get File Name Without Extension Command

GetFileNameWithoutExtension command under FILEHANDLER function is used to get the file name without file extension.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as getFileNameWithoutExt and provide file path in file.

File name without extension will get stored in a variable defined in Element Key.

Create Directory Command

Create Directory command under FILEHANDLER function is used to create a new directory/folder on the specified location.

Select RUN command from the action dropdown and leave Screen and Element Key as blank, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as createDirectory and provide directory/folder path with new folder name at the end of the path.

Zip Command

Zip command under FILEHANDLER function is used to zip a particular folder.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as zip, provide source and destination.

If the zip is created successfully, it will return true else it will return false in a variable defined in Element Key.

Unzip Command

Unzip command under FILEHANDLER function is used to unzip a particular file.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as unzip and provide file path to unzip.

After executing this command, given file will be unzipped at the same location of the file and it will return the path in a variable defined in Element Key.

SplitFile Command

SplitFile command under FILEHANDLER function is used to split the files.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as splitFile provide source and lineNos.

Merge Folders Command

Merge Folders command under FILEHANDLER function is used to merge the content of two folders into given destination folder.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as mergeFolders, provide destination, sourceFolder1 and sourceFolder2.

If the content of both the folders are merged successfully in the destination folder, it will return true else it will return false in a variable defined in the Element Key.

Convert CSV to Xlsx Command

Convert CSV to Xlsx command under FILEHANDLER function is used to convert a csv file into xlsx file.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as convertCsvtoXlsx and provide file path in file.

After execution, file path of converted xlsx file will be returned in a variable defined in Element Key.

Convert Excel to CSV Command

Convert Excel to CSV command under FILEHANDLER function is used to convert a excel file into csv file.

Select SET command from the action dropdown and provide a variable name in Element key where output will be stored, edit parameter section and click on Form, select functions from the dropdown and select FILEHANDLER function. Select cmd as convertExceltoCsv and provide file path in file.

After execution, file path of converted csv file will be returned in a variable defined in Element Key.

Was this page helpful?