Extracts the entire path except the last component.
Directory = SRP_Path("GetDirectory", Path) |
Parameter | Description |
---|---|
Path | A path with or without command line parameters. |
The directory portion of the path.
The GetDirectory service extracts the entire path except the last component. The directory will be returned with the backlash at the end. If Path already ends with a backslash, then the whole path is returned because a path ending in a backslash is assumed to be a directory.
Note. This method supports paths that contain command line parameters. In this case, command line parameters are simply ignored.
Path = "C:\path1\path2\path3\filename.txt" Result1 = SRP_Path("GetDirectory", Path) Result2 = SRP_Path("GetDirectory", Result1) Result3 = SRP_Path("GetDirectory", SRP_Path("RemoveBackslash", Result2)) |
Result1 and Result2 will both be "C:\path1\path2\path3\". Result3 will be "C:\path1\path2\".
GetComponents, GetExtension, GetFilename, GetParameters, GetPath, RemoveDirectory