File Operation

NO IMAGE

Japanese may be displayed on some pages.

 Home > User guide > BOT > How to use the BOT editor > File Operation

Introduction - File Operation

Operations such as file download/upload can be automated.

The downloaded file is saved in a Virtual browser temporarily.

The file downloaded in the Virtual browser can be set as the output value after upload operation or BOT execution by copying it as the BOT data value.

Download a File

Click a Button to Download a File

Operating Instructions  
  1. Place the cursor on the button.
  2. Click [Click] in the operation menu.
Watch a Video   No audio.

Watch in HD

Download a File Using a Link

Operating Instructions  
  1. Place the cursor on the link.
  2. Select [Other functions] in the main menu and click [Download].
Watch a Video   No audio.

Watch in HD

Download an Image File

Operating Instructions  
  1. Place the cursor on the link.
  2. Select [Other functions] in the main menu and click [Download].
Watch a Video   No audio.

Watch in HD

Download a Displayed Page

Operating Instructions  
  1. Place the cursor on the address bar.
  2. Click [Download the URL].
Watch a Video   No audio.

Watch in HD

Review the List of Downloaded Files

Operating Instructions  

• Click [View] in the “There is a new download file.” message.
• Or, click [Download(s)] (top right of the BOT Editor).

* It is displayed at the top of the screen in a smart phone.
* The downloaded file on the Virtual browser can be browsed from “Execution Logs” if you set it as an output value.

Preview a File

Operating Instructions  
  • Open the Downloads screen and select [Preview].
* This operation is not recorded as a BOT task. It opens in a separate tab from the BOT editor. Depending on the file type, it is downloaded locally.

Copy a File to a Data Value

The downloaded file can be copied as a BOT data value to select as an upload file or output as a BOT’s execution result.

Operating Instructions  
  1. Click [Copy x file(s)] on the Downloads screen.
  2. Select [New data] in "Destination data".
  3. Enter a value in the [Data name] text box.
Watch a Video   No audio.

Watch in HD

Selection Conditions for Files to Be Copied

BOT searches the Virtual browser for the file to be copied. At that time, the following conditions take precedence.

  • Selected in order from the newest downloaded file.
  • If you specify a file name, a file with the same name will be selected.

Use wildcard

The following wildcards can be used to define the file name.(*: Contains any zero or more characters , ?:Contains any one character)

SampleApplicable file name
*.jpgAll files with a .jpg extension
*All files
?.jpgFiles with a .jpg extension and any 1 character
??.jpgFiles with a .jpg extension and any 2 character
wh*who, why, what, when, which...
wh?Who or why

Use regular expression

[. *] button can be enabled to use regular expressions to specify file names.

SampleApplicable file name
\d{4}-\d{2}-\d{2}\.csvFiles with .csv extension and YYYYY-MM-DD file name format
\d+\.pngFiles with .png extension and a file name of at least one arbitrary number
* If pattern matching is not performed, or if the corresponding file does not exist, the error "No matching file" is displayed.

Copy Multiple Files as One Data

When coping the downloaded as a BOT data value, you can copy multiple files as one data of BOT (In technical terms, it can be treated as array data).

In the "The file to copy" item, you can add files to be copied with [+] , and reduce the number of files to be copied with [-].

When copying to existing data, select the relevant data name in "Destination data".

You can also narrow the number to copy by selecting check boxes. You can set whether the file is required or not.

Rename and copy the file

When copying a downloaded file as a BOT data value, you can click the "Copy as" button, rename the file, and copy it.

References to data in the BOT

The value stored as data in BOT can be referenced by using $ {data name}.

You can browse the data and insert it into the Script from the Data reference button.

Use regular expression capture

A regular expression capture can be used to reference a specific string from the original filename and insert it into the filename.

Upload a File

You can upload a file that is set to the data value.

[When uploading the downloaded, you have to copy the file as a data value.] >> Click here for details

Operating Instructions  
  1. Place the cursor on the button.
  2. Click [Click] in the operation menu.
  3. Select the set data value from the drop down menu.
  4. Click [Choose file].
Watch a Video   No audio.

Watch in HD

Use Cloud BOT Agent version 3.0.0 or later.