Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

File package

  • Updated: 2021/12/22
    • 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 Desktop file See Using Copy Desktop file 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.
Copy Control Room file Copies a file from the Control Room public repository to a specified location on the device.
  • In the Control Room file field, specify the file to copy. Select one of the following options to copy a file from the Control Room repository:
    • Static file path: Enables you to browse the Control Room repository and select the file. Use this option when the file path is static.
      Note: When you browse the Control Room repository using Static file path, files with the .bot extension are not displayed.
    • Dynamic file path: Enables you to browse the Control Room repository and select the file. In addition, it also enables you to insert variables in a file path to copy a file from the Control Room repository where the file path is dynamic. 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$

  • In the Target file path field, specify the path to the location 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 exist, the bot creates all the folders as needed.
  • Select True or False, or insert a Boolean variable to specify whether to overwrite the existing file.
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.
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 Control Room option 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