Skip to main content

Get file path information

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

Get the root directory, parent directory, file name, base file name and file extension of a file path. This command allows you to extract different components of a file path for further processing in your workflow.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Select a file

Select a file, and retrieve its full file path, including root directory, parent directory, file name, base file name and file extension

Any valid file path

Yes

You can manually enter a path or use the file selector

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

Store the file information in a new variable. This variable will contain all file path components that can be accessed individually.


Using Variables in Conditions

You can use the variable created by this action in subsequent steps. The output variable contains multiple properties that can be accessed:

  • Root directory

  • Parent directory

  • File name (with extension)

  • Base file name (without extension)

  • File extension

These properties can be referenced in other actions by using the variable name followed by the property name.


Notes

  • The file must exist and be accessible for the command to successfully extract path information

  • If an invalid file path is provided, the action will fail according to the error handling settings

  • This command is useful for file manipulation operations where you need to work with specific parts of a file path

Did this answer your question?