$shortfn

From Scriptwiki
Revision as of 17:02, 10 May 2008 by Aca20031 (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

$ShortFN returns the short version of the given file name/directory.

$shortfn(file)

If you've ever noticed in windows when dealing with shortcut targets or command prompts, some long directory or file names are shortened by giving the first six characters in the name, followed by a tilda and a number. The number is for duplicates, for example in the case of two folders, one named "Program Files" and the other "Program Accessories", the first would be PROGRA~1 and the second would be PROGRA~2. The short names work just like the long names.

Example

$shortfn($mircexe)
Returns: C:\PROGRA~1\mIRC\mirc.exe