Skip to main content Skip to complementary content

Configuring file existence verification

Procedure

  1. Double-click the tSCPFileExists component to open its Basic settings view.
  2. Select the Use an existing connection check box and then select the connection you have configured from the Component List.
  3. In the Filename field, enter the name of the file to be checked between double quotes. In this example, it is “testscp.txt”.
  4. Double-click the tJava component to open its Basic settings view.
  5. In the Code field, enter the following code:
    System.out.println((String)globalMap.get("tSCPFileExists_1_FILENAME"));
    System.out.println((String)globalMap.get("tSCPFileExists_1_STATUS"));
  6. Select the Component tab and click the If connection to open its Basic settings view.
  7. In the Condition field, enter the following code:
    !((String)globalMap.get("tSCPFileExists_1_STATUS")).equals("File exists.")
    This way, if the file doesn't exist in the defined directory, the rest of the Job will be executed.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!