CSplitpath:Merge
The Merge method combines the path components in a CSplitpath object into a single path. The resulting path string is returned.
sString = CSplitpath:Merge() |
|
Suppose a file exists with a full path named sPath. The script below changed the file name and extension to the string sNewName and merges the components back into a full path:
|
-- create a CSplitpath object for the string sPath |
|
-- change the file name and extension |
|
-- merge components into a new path, sNewPath |
|
-- use the path name ... |
|
-- when done with S, remove it from memory |