Removes the file extension, if there is one.

Syntax

NewPath = SRP_Path("RemoveExtension", Path)

Parameters

ParameterDescription
PathA path with or without command line parameters.

Returns

The path without the extension.

Remarks

The RemoveExtension service returns the given path without the extension, if it could find one.

Note. This method supports paths that contain command line parameters. In this case, command line parameters are simply ignored.

Example

Result1 = SRP_Path("RemoveExtension", "C:\path\filename.txt")
Result2 = SRP_Path("RemoveExtension", "C:\path\filename.txt.ext")

Result1 will be "C:\path\filename". Result2 will be "C:\path\filename.txt".

See Also

 AddExtension, GetExtensionRemoveBackslash, RemoveDirectory, RemoveFilename, RemoveParameters, RenameExtension

  • No labels