• Toggle theme

Directory Opus Manual

User Tools

  • Toggle theme
  • Log In

Site Tools

You are here: Introduction » Reference » Evaluator Functions » FilePart

Sidebar

  • Copyrights
  • Licenses
  • Acknowledgements
  • Introduction
  • Basic Concepts
  • File Operations
  • FTP
  • Additional Functionality
  • Preferences
  • Customize
  • File Types
  • Scripting
  • Evaluator
  • Reference
    • Wildcard Reference
    • Status Bar Codes
    • Command Reference
    • Scripting Reference
    • Evaluator Functions
      • AbortFunc
      • Abs
      • Age
      • Arg
      • As
      • Asc
      • Atan
      • Capitalize
      • Cbrt
      • Ceil
      • Chr
      • Clip
      • ClipFormat
      • Concat
      • Cos
      • Count
      • DateDiff
      • DatePart
      • DegToRad
      • DisplayName
      • DumpVars
      • Elapsed
      • Exists
      • FileCount
      • FileExt
      • FilePart
      • FindWindow
      • Floor
      • Format
      • Hypot
      • InStr
      • IsAlpha
      • IsChecked
      • IsDigit
      • IsDir
      • IsEnabled
      • IsFile
      • IsLower
      • IsParent
      • IsPath
      • IsPunct
      • IsSelected
      • IsSet
      • IsSpace
      • IsUpper
      • KeyDown
      • LanguageStr
      • LCase
      • Left
      • Len
      • MakeLegal
      • Match
      • Max
      • Mid
      • Min
      • Now
      • Output
      • Parent
      • PathType
      • Pow
      • RadToDeg
      • RecycleBin
      • RegEx
      • RegExS
      • Replace
      • Resolve
      • Reverse
      • Right
      • Root
      • Rnd
      • Round
      • Running
      • Select
      • Sin
      • Space
      • Stem
      • StrCmp
      • String
      • Sqrt
      • Swap
      • SysInfo
      • Tan
      • Trim
      • Truncate
      • TypeOf
      • UCase
      • URLEncode
      • Val
    • DOpusRT Reference
    • Metadata Keywords
    • Textual Filters
    • Icon Sets
    • Rename Macro Language
  • New In Directory Opus 13
reference:evaluator:filepart

FilePart(
     path:path,
     [int:components]
)
→ string

Arguments

path

File or folder path.

components

Optional. Number of components to return.

Return value

Filename component of specified path.

Description

Returns the filename (trailing) component or components of the specified path. If components isn't specified, the final component is returned.

Example:

Output(FilePart("C:\one\two\file.jpg"));
--> file.jpg

See also:
FileExt
Parent
Root
Stem