Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

File package

  • Updated: 10/08/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace

File package

Automate various file-related operations, such as creating, opening, copying, renaming, and deleting a file, by using the actions available in the File package.

You can use the actions in the File package either individually, to perform an action one time, or in a Loop action, to perform that action for each file available in a folder.

Actions in the File package

Note: You can use the Zip action available in the Folder package to compress a file. See Using the Zip action.

The File package includes the following actions:

Action Description
Assign Assigns a file from the Control Room, Desktop, or an existing File variable to a user-defined File variable.
Copy See Using Copy action for file.
Create Creates a new file.
  • In the File field, specify the name including the location to store the file.
  • In the Overwrite an existing file option, select an existing file with the same name to overwrite it. If existing files are not overwritten, the Control Room appends the name of the new file with a numeric value.
Create shortcut Creates a shortcut to a file at a user-specified location. The shortcut is dependent on the source file, so any changes you make to the source file will also apply to the shortcut.
  • In the Target location field, specify the name and location.
  • In the Shortcut location field, specify the name and location.
Note: Users with a valid role and required permission can create a shortcut to a file at a specified location.
Create symbolic link Creates a symbolic link to a file at a user-specified location. The shortcut is dependent on the source file, so any changes you make to the source file will also apply to the shortcut.
  • In the Target location field, specify the name and location.
  • In the Shortcut location field, specify the name and location.
Note: Users with only admin access can create a shortcut to a file at a specified location.
Delete See Using Delete action for file.
Download CR file Downloads a file from the Control Room to a specified location on the device.
Note: You cannot use this action to download a bot or a file from the My Scripts folder.
  • In the Select a Control Room file field, specify the file to download.
  • In the Save CR file to location field, specify the path where you want to save the file. You can insert a variable that holds the entire file path, or part of the file path.
    For example, C:\user\My Docs\test.csv or C:\user\My Docs\$fileName$
    Note: If the folder structure does not already exist, the bot creates the folders as needed.
  • Select True or False, or insert a Boolean variable to specify whether to overwrite the existing file.
Get name Retrieves the file name from the Control Room, desktop, or an existing file variable and stores the file name in a selected output string variable.
Get path Retrieves the file path from the Control Room, desktop, or an existing file variable and stores the file path in a selected output string variable.
Note: When you select the option Control Room to retrieve the file path, the bot displays the local file path of the downloaded Control Room file.
Open Opens an existing file. In the File field, specify the name including the location to store the file.

You can use a regular expression (regex) or a pattern-based search to open an existing file that matches the search criteria. Select the regular expression either as a String or Pattern for each regular expression condition and enter the value.

Print See Using Print action for file.
Print multiple files See Using Print multiple files action.
Rename See Using Rename action for file.
Send Feedback