%SplitPath% Show Routine Code Author: Siegfried
Version: 1 - Date: 2007-02-15
Example calls:
%SplitPath% "%ProgramFiles%\Symantec\Norton Ghost\New Ghost Tray.exe" "show"
%SplitPath% "%AppData%" "show"
%SplitPath%
Remarks:
Splits up a path into its elements and returns them as various variables.
For details see the example below or just run example 1 for a test.
If parameter 2 is empty the results are not displayed.
The input path may be given with or without a file or with/without trailing backslash. All result paths will be without trailing backslash.
*** Example 1 returns the following results: ***
%PathFull% is "C:\Programme\Symantec\Norton Ghost"
%PathFull2% is "C:\Programme\Symantec"
%PathFull3% is "C:\Programme"
%PathCore% is "Programme\Symantec\Norton Ghost"
%PathCore2% is "Programme\Symantec"
%PathCore3% is "Programme"
%LastDir% is "Norton Ghost"
%LastDir2% is "Symantec"
%LastDir3% is "Programme"
%FirstDir% is "Programme"
%FirstDir2% is "Symantec"
%FirstDir3% is "Norton Ghost"
%File% is "New Ghost Tray.exe"
%FileName% is "New Ghost Tray"
%Extension% is ".exe"
%Drive% is "C:"
%LastDirNB% is "NortonGhost"
%FileNB% is "NewGhostTray.exe"
%FileNameNB% is "NewGhostTray"
NOTE: the quotation marks are NOT part of the results.