# <H1 align="center">Module «Work with files</h1> 

<p> 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.</p>

## Module interface
<p> Module widow has three groups of elements.
<p> 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.
<H1 align="center">![Screenshot](img/FM_1.png)</h1> 
## Module functionality 
### Creating a command
<p> 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
<p> 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
<p> In order to delete a command select it in the command list and press the «Delete» button.
### Turning on/off a command
<p> 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».
<H1 align="center">![Screenshot](img/FM_2.png)</h1>
### Choosing file/folder
<p> 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»
<p> Action rewrites the existing file, by adding text entered in the «Value» field.
<H1 align="center">![Screenshot](img/FM_4.png)</h1>
### Action «Read file»
<p> Action reads all text from the existing file and enters it to the specified variable.
<H1 align="center">![Screenshot](img/FM_5.png)</h1>
### Action «Get list of file in folder»
<p> The action creates a list-variable that contains paths to each file in the folder. 
<H1 align="center">![Screenshot](img/FM_6.png)</h1>
### Action «Move file»
<p> Action moves the file into the specified folder.
<H1 align="center">![Screenshot](img/FM_7.png)</h1>
### Action «Move folder»
<p> Action moves the folder, specified in the second field into the directory specified in the third field.
<H1 align="center">![Screenshot](img/FM_8.png)</h1>
### Action «Archive folder»
<p> Action creates a ZIP archive with the specified name, adding the contents of the selected folder to it. 
<H1 align="center">![Screenshot](img/FM_9.png)</h1>
### Action «Unzip archive»
<p> Action unzips a ZIP archive into the specified folder.
<H1 align="center">![Screenshot](img/FM_10.png)</h1>
### Action «Create folder»
<p> Action creates a folder with a specified name in the selected directory.
<H1 align="center">![Screenshot](img/FM_11.png)</h1>
### Action «Delete folder»
<p> Action deletes the selected folder.
<H1 align="center">![Screenshot](img/FM_12.png)</h1>
### Action «Create .txt file»
<p> Action creates a file with .txt extension.  
<H1 align="center">![Screenshot](img/FM_13.png)</h1>
### Action «Delete file»
<p> Action deletes the selected file.
<H1 align="center">![Screenshot](img/FM_14.png)</h1>
### Action «Copy file»
<p> Action copies the selected file to the specified directory. 
<p> 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.
<H1 align="center">![Screenshot](img/FM_15.png)</h1>
### Action «Check file existence»
<p> Action checks the existence of the specified file and projects the result to the variable.
<p> «True» - if exists, «False» - if it doesn't.
<H1 align="center">![Screenshot](img/FM_16.png)</h1>
### Action «Check folder existence»
<p> Action checks the existence of the specified folder and projects the result to the variable.
<p> «True» - if exists, «False» - if it doesn't.
<H1 align="center">![Screenshot](img/FM_17.png)</h1>
