Returns the 8.3 short path+name of the path+name passed.
FileGetShortName ( "filename" [, flag = 0] )
|filename||full path and file name to convert|
$FN_FULLPATH (0) - Default
$FN_RELATIVEPATH (1) - file can have relative dir, e.g. "..\file.txt"
Constants are defined in FileConstants.au3.
|Success:||the 8.3 short path+name of the path+name passed.|
|Failure:||the parameter and sets the @error flag to 1.|
The file needs to exist as there is no way to know the exact ~i if several file have the same 8 first characters.
#include <MsgBoxConstants.au3> Example() Func Example() ; Create a constant variable in Local scope of the filepath to retrieve the shortname of. Local Const $sFilePath = @ProgramFilesDir ; Display the short path+name of the program files directory. MsgBox($MB_SYSTEMMODAL, "", FileGetShortName($sFilePath)) EndFunc ;==>Example