CSplitpath:GetFolder
The GetFolder method returns the folder name from a CSplitpath object. The returned string includes the machine name, drive name, and directory. The string is terminated by a backslash character, \.To return the folder without a terminal backslash, use GetFolder2() instead.
sFolder = CSplitpath:GetFolder() |
|
On success, this method returns a string containing the machine name, drive, and directory.
On failure, this method returns nil.
Suppose a file exists with a full path named sPath. The following script retrieves the folder component:
|
-- create a CSplitpath object |
|
-- Specify the path to be split |
|
-- assigns the folder component to the string sFolder |
|
-- when done with S, remove it from memory |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.