CSplitpath:SetFilenameExt
The SetFilenameExt method sets the file name and extension components of the CSplitpath object. The File name + extension is passed as a single string in the format 'filename.ext'. Use Merge to combine this component and the other components into a full path.
bSuccess = CSplitpath:SetFilenameExt( sNameExt ) where |
|
sNameExt is the new file name and extension.
bSuccess is the returned success code. On success it is true, otherwise false.
Suppose a file exists with a full path named sPath. The following script creates a new path using a different file name and extension named sNewNameExt:
|
-- create a CSplitpath object for path sPath |
|
-- assign a new file name and extension |
|
-- combine the path components |