• Toggle theme

Directory Opus Manual

User Tools

  • Toggle theme
  • Log In

Site Tools

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

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:root

Root(
     path:path
)
→ path

Arguments

path

File or folder path.

Return value

Root of specified path.

Description

Returns the root of the specified path.

On error, an empty string will be returned.

If the path is already a root, it will be returned unchanged.

Example:

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

See also:
FileExt
FilePart
Parent
Stem