Contact Us 1-800-596-4880

File Operations

File Operations enable you to interact with the file system where your automation is running.

  • Copy File

    This action step copies a file from one directory to another.

  • Create File

    This action step creates an empty file at the specified path.

  • Delete File

    This action step deletes a file located at the specified path.

  • Extract Images from PDF File

    This action step enables you to extract images from a PDF file.

  • File Check

    This action step enables you to check whether a file exists or not.

  • Get File Info

    This action step fetches information about a file at the specified path.

  • Iterate over Files

    This action step performs various action steps on a specified number of files.

  • Move File

    This action step moves a file from one directory to another.

  • Read from Text File

    This action step enables you to read from a text file and use the Read Mode to specify which part of the file is to be read.

  • Read PDF File

    With the Read PDF File action step, you can read text from a PDF file.

  • Rename File

    This action step renames a file.

  • Write to Text File

    Write to Text File writes text to a text file.

Common Settings and Properties

The following settings and properties apply to all the File Operations action steps:

  • Action Step Settings

    Specify path information for all action steps of the type File Operations in Settings. To access the Settings configuration panel, click (The Settings icon Settings) in the Workflow Initialization block.

  • Path checking

    The paths calculated at runtime for File Operations are checked against the list of allowed paths configured in the Allow File Operation Action Steps only in following paths option inside Workflow SettingsFile Operation Settings.

  • Path / file name / invalid characters

    RPA Builder manages the path and file name separately and makes them available to other operations as the Outbound Variables File Name and Directory Path. action steps cannot interpret wildcards in the form of ? or *.

    Use unique file names at all times. If the path or file name contains invalid characters, the action step goes into an error state (this does not apply to the File name in the Iterate over Files Action Step). The Iterate over Files action step iterates over the result of a wildcard operation in the form of an Action Block.

    The following characters are invalid:

    Symbol Explanation

    <

    Less than sign

    >

    Greater than sign

    :

    Colon

    "

    Double quotes

    /

    Forward slash

    \

    Back slash

    |

    Vertical bar

    ?

    Question mark

    *

    Asterisk

  • Timeout

    If the desired File Operation is not completed successfully within this time, the action step goes into an error state.

  • Insert environment variable

    The Insert Environment Variable drop-down list of all File Operation action steps contains a predefined list of Windows environment variables. Use these in the Directory Path field to define a variable path to a file within the relevant action steps. The variable will be inserted at the current location of the cursor. The standard environment variables and variables defined by the user in RPA Builder are available.

    The environment variables contain paths to specific folders. The default installation location for Internet Explorer, for example, is C:\Program Files\Internet Explorer\ or C:\Program Files x86\Internet Explorer\. The path may vary if the operating system was installed on a different drive or in a different language.

    The following list contains the key environment variables:

    • %ALLUSERSPROFILE%

      The All Users profile folder

    • %APPDATA%

      The folder for the Application Data of the user who is presently logged in

    • %COMPUTERNAME%

      System name

    • %ProgramFiles%

      The folder for Programs

    • %SystemRoot%

      The system root folder, for example C:\Windows

    • %SystemDrive%

      The system root drive, for example C:\

    • %USERPROFILE%

      The profile folder for the user who is presently logged in

  • Insert Script Variable

    The Insert Script Variable drop-down list of all File Operation action steps contains a predefined list of script variables. Use these in the Directory Path field to define a variable path to a file within the relevant action steps. The variable is inserted at the current location of the cursor.

    The following RPA Builder script variables are available:

    • Computer Name

      This script variable {@ComputerName} inserts the name of the computer on which the Action Script is presently running.

    • Local Host Name

      This script variable {$HostName} inserts the name of the host on which the Action Script is presently running. The host name may differ from the computer name if, for example, several virtual machines are running on one host.

    • Login User Name

      This script variable {$UserName} inserts the name of the user who is logged in.

    • New Line

      This script variable {@CRLF} creates a line break. This script variable works only in the action step Write to Text File.

    • Script Run Directory

      The script variable {@ScriptDir} returns the directory containing the Workflow without a trailing backslash.

    • Tabulator

      This script variable {@TAB} inserts a tab stop. This script variable works only in the action step Write to Text File.

  • User privileges

    For all action steps of the type File Operations, the file operations are successful only if the user who is presently logged in has privileges to access the directories and files used.