CSplitpath:SetFilename
The SetFilename method sets the file name component of the CSplitpath object. Use Merge to combine this component and the other components into a full path.
bSuccess = CSplitpath:SetFilename( sName ) |
|
Suppose a file exists with a full path named sPath. The following script fragment creates a new path using a different file name sNewName:
|
-- create a CSplitpath object |
|
-- set the starting path |
|
-- assign a new file name |
|
-- combine the path components |
|
-- do something with the new path |
|
-- when done with S, remove it from memory |