# Configuring file existence verification

## Procedure

1. Double-click the tSCPFileExists component to open its Basic settings view.

   ![](https://help.qlik.com/talend/en-US/components/7.2/Resources/images/components-tscpfileexists_s1_tscpfileexists.png)
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.

   ![](https://help.qlik.com/talend/en-US/components/7.2/Resources/images/components-tscpfileexists_s1_tjava.png)
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.

   ![](https://help.qlik.com/talend/en-US/components/7.2/Resources/images/components-tscpfileexists_s1_if.png)
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.