Module «Work with files

The «Work with files» module is designed for changing file directory, copying them, archiving them, making folders and transfer files to it, in general, to manipulate files and directories.

Module interface

Module widow has three groups of elements.

First group of elements is a number of fields and buttons for creating a command. Second group of elements is a list of commands. And the third group of elements is a preview area for viewing text files.

![Screenshot](img/FM_1.png)

## Module functionality ### Creating a command

To create a command you need to – select the desired action, fill out the remaining fields – click the «Add» button, and the command will be added to the «Command list». ### Editing a command

To edit a command you need to select it from the list of commands by left-clicking on it, after which all fields in the top left part of the «Work with files» window will be filled in accordance with the selected command. Change the fields you want to edit, making sure that the action you're editing is still selected in the command list. ### Deleting a command

In order to delete a command select it in the command list and press the «Delete» button. ### Turning on/off a command

You can turn the commands on and off. Turned off commands won't run. You can do that by right-clicking on the command and pressing «Turn on/off».

![Screenshot](img/FM_2.png)

### Choosing file/folder

The button ![Screenshot](img/FM_3.png) in fill out fields opens up a standard dialog window for choosing a file or a folder, depending on a selected action. ## List and description of actions ### Action «Save in file»

Action rewrites the existing file, by adding text entered in the «Value» field.

![Screenshot](img/FM_4.png)

### Action «Read file»

Action reads all text from the existing file and enters it to the specified variable.

![Screenshot](img/FM_5.png)

### Action «Get list of file in folder»

The action creates a list-variable that contains paths to each file in the folder.

![Screenshot](img/FM_6.png)

### Action «Move file»

Action moves the file into the specified folder.

![Screenshot](img/FM_7.png)

### Action «Move folder»

Action moves the folder, specified in the second field into the directory specified in the third field.

![Screenshot](img/FM_8.png)

### Action «Archive folder»

Action creates a ZIP archive with the specified name, adding the contents of the selected folder to it.

![Screenshot](img/FM_9.png)

### Action «Unzip archive»

Action unzips a ZIP archive into the specified folder.

![Screenshot](img/FM_10.png)

### Action «Create folder»

Action creates a folder with a specified name in the selected directory.

![Screenshot](img/FM_11.png)

### Action «Delete folder»

Action deletes the selected folder.

![Screenshot](img/FM_12.png)

### Action «Create .txt file»

Action creates a file with .txt extension.

![Screenshot](img/FM_13.png)

### Action «Delete file»

Action deletes the selected file.

![Screenshot](img/FM_14.png)

### Action «Copy file»

Action copies the selected file to the specified directory.

In the «Path to the destination file» field enter the path to the folder into which the file should be copied, and its name with the extension as if the file already exists. The new name may differ from the original.

![Screenshot](img/FM_15.png)

### Action «Check file existence»

Action checks the existence of the specified file and projects the result to the variable.

«True» - if exists, «False» - if it doesn't.

![Screenshot](img/FM_16.png)

### Action «Check folder existence»

Action checks the existence of the specified folder and projects the result to the variable.

«True» - if exists, «False» - if it doesn't.

![Screenshot](img/FM_17.png)