Removes the filename and extension, if there is one.

Syntax

NewPath = SRP_Path("RemoveFilename", Path)

Parameters

ParameterDescription
PathA path with or without command line parameters.

Returns

The path with the filename and extension.

Remarks

The RemoveFilename service removes the filename and extension from the path and returns what's left. Quotes are preserved.

Note. This method supports paths that contain command line parameters. In this case, command line parameters are returned as well.

Example

Path = "C:\path1\path2\path3\filename.txt"
Result = SRP_Path("RemoveFilename", Path)

Result will be "C:\path1\path2\path3\".

See Also

GetFilenameRemoveBackslash, RemoveDirectory, RemoveExtension, RemoveParameters

  • No labels