Skip to main content
Skip table of contents

Operation: Exists

The Exists operation checks whether the files or folders defined in the path parameter exist. Outputs an XML with metadata as a result.

Status values

1

The adapter operation was executed successfully.

-1

The file or folder does not exist.

Examples

The following example shows a sample parameterization of the adapter for the Exist operation to check whether the target file defined in path parameter exists.

Parameters

Value

pathC:\MyFolder\File.xml

Output

If the file does not exist:

XML
<?xml version="1.0" encoding="UTF-8"?>
<Error>java.nio.file.NoSuchFileException: C:\MyFolder\File.xml</Error>

If the file exists:

XML
<?xml version="1.0" encoding="UTF-8"?>
<Entry isDirectory="false" name="File.xml">
   <CreationDate>2021-06-18T08:59:20.910681Z</CreationDate>
   <LastModified>2021-06-18T08:22:59.284859Z</LastModified>
</Entry>

When checking if a folder exists, the attribute isDirectory="true" is set.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.