File system

日本語のページ

The "File" → "File Operations" group blocks allow you to perform various file operations.

Connecting to the RPA Server

File operations are performed via the RPA server.
Before executing a file operation block, execute the block that connects to the RPA server.

Connect to RPA server

Operating the Current Folder

You can get or change the currently active folder (current folder).

Get current folder
Change current folder

In blocks such as copy, if you do not specify the full path of the file or folder name, the current folder will be used as the reference.

Copy/Delete/Move/Rename Files/Folders

You can copy, delete, move, and rename files and folders.

Copy file
Copy folder
Rename file
Remove file
Remove folder

Moving files and folders is done using the rename block.
By specifying a different folder name for the destination file or folder, the move will be performed.

Getting a list of files in a folder

You can get a list of files and folders within a folder.

Filename list of folder

The list of files/folders is returned as a list.
If you check "Full path," the file/folder name will be in the form of a full path.
If you uncheck this option, the search will display only the filename/folder name, not the full path.

You can also use the search block to search for files and folders.

Find files

The "pattern" parameter allows you to use wildcards such as "?" and "*".
For example, specifying "*.txt" in the "pattern" parameter will search for files with the .txt extension.
Checking the "search subfolders" option allows you to search not only the files directly within the specified folder, but also its subfolders.
The search results are returned as a list, with the folder name specified in the "folder" parameter prepended to each file name.
To obtain results with full paths, specify the full path in the "Folder" parameter.

Splitting and Merging Paths

You can split a path into folders and file names (e.g., splitting "folder/file.txt" into "folder" and "file.txt").

In the "List of Split Folders and File Names" block, the results are returned as a list, with the first element being the folder name and the second element being the file name.

Split path to folder and filename
Get filename of path
Get folder of path

You can also split a filename into its base name and extension (e.g., splitting "file.txt" into "file" and ".txt").
In the "List of Split Filenames with Base Name and Extension" block, the result is returned as a list, with the first element being the base name and the second element being the extension.
The extension includes the leading ".".

Split filename to basename and extension
Get basename
Get extension

Retrieving File Information

You can retrieve the file size and date.

Get file size
Get last access time
Get last modification time

Furthermore, you can check whether the path is a file name or a folder name, and whether the file or folder exists.

Is path a file?
Is path a folder?
Does the file exists?

Selecting Files and Folders in a Dialog Box

You can open a dialog box to select files and folders.

Show open file dialog
Show save file dialog
Show select folder dialog

The name of the selected file/folder will be returned as the return value.
On the other hand, if the "Cancel" button is clicked, the return value will be null.
After executing these blocks, the subsequent processing will be determined based on whether the return value is null or not.