Get File Path

Verb: getFilePath

Gets a file path according to the defined parameters.

Syntax

getFilePath --path(String) [--filemask(String)] [--orderbyname(Boolean)] [--orderbylastmodification(Boolean)] [--orderbyextension(Boolean)] [--orderbysize(Boolean)] [--reverseordering(Boolean)] --position(Numeric) [--fileSystem(FileSystem)] (String)=value

Inputs

Script Designer Required AcceptedTypes Description
--path Directory Required Text Folder that contains the desired file.
An existing directory is required. If it does not exist, it is possible to create it using the Create Directory command.
--filemask Filter Optional Text Character(s) used when searching for the file.
--orderbyname Sort by name Optional Boolean When enabled, sorts the file path by name.
--orderbylastmodification Sort by last modification date Optional Boolean When enabled, sorts the file path by last modification date.
--orderbyextension Sort by extension Optional Boolean When enabled, sorts the file path by extension in alphabetical order.
--orderbysize Sort by size Optional Boolean When enabled, sorts file path by size.
--reverseordering Sort reverse Optional Boolean When enabled, sorts the file path in reverse.
--position Position Required Number Index in which the file is located in the defined directory.
The file index can be changed according to the defined sorting.
--fileSystem File System Optional File System File system connection variable.
1. To get the connection variable with an available file system, this connection must be established using one of the following commands: Connect to Dropbox, Connect to Google Drive or Connect to Microsoft Corporation OneDrive, which must be pre-configured in the Web Client.
2. If nothing is specified in this parameter, the opeating system's local file system is used by default.

Outputs

Script Designer AcceptedTypes Description
value Path Text Returns the file path.

Example

The command gets the file path by name, returning the path as a log message.

defVar --name desktop --type String
defVar --name file --type BinaryFileWriter
defVar --name path --type String
// Obtém o caminho da pasta "Desktop".
getSpecialFolder --folder "Desktop" desktop=value
// A .txt file with name "file" is created in this folder.
openBinaryWriter --mode "CreateNew" --autoflush  --share "Write" --path "${desktop}\\file.txt" --encoding "Default" file=value
// The command gets path of this file, filtering by name.
getFilePath --path "${desktop}" --filemask file --position 1 path=value
// Logging the path.
logMessage --message "${path}" --type "Info"

Remarks

This command is obsolete, use the Get Files command instead, which can also search subdirectories and returns every file paths related to this search.

See Also

  • Check If Directory Exists
  • Convert Base64 to File
  • Convert File to Base64
  • Copy File
  • Count Files
  • Create Directory
  • Delete Directory
  • Delete File
  • Delete from Directory
  • Download from File System
  • Get Directories
  • Get Files
  • If File Exists
  • Move File
  • Read All Bytes
  • Read All Text
  • Rename File
  • Send to File System
  • Write to File