![]()  | 
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 )  | 
 
  | 
    On
success, this method returns true.
    On
failure, this method returns 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  | 
| 
 | 
 -- set the starting path  | 
| 
 
  | 
 -- assign a new file name and extension  | 
| 
 | 
 -- combine the path components  | 
| 
 | 
 -- do something with the new path  | 
| 
 | 
 -- when done with S, remove it from memory  | 
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.