Files.ExtractFileName |
Top Previous Next |
Syntax function Files.ExtractFileName(FileName: string): string
Alternative Names
Description Returns the file-name section for the given FileName, removing any directories or drive letters from the string. Returns an empty string if file-name is available.
See also
Example execute udsblock as begin /* returns c:\ */ str = Files.ExtractFileDir('c:\pagefile.sys');
/* returns c:\windows */ str = Files.ExtractFileDir('C:\Windows\');
/* returns c:\ */ str = Files.ExtractFileDir('C:\Windows');
/* returns C:\Windows\System32 */ str = Files.ExtractFileDir('C:\Windows\System32\mydll.dll');
/* returns C:\Windows\System32\ */ str = Files.ExtractFilePath('C:\Windows\System32\mydll.dll');
/* returns mydll.dll */ str = Files.ExtractFileName('C:\Windows\System32\mydll.dll');
/* returns '' */ str = Files.ExtractFileName('C:\Windows\'); end |