FileGetLongName
返回完整路径名称.
FileGetLongName ( "filename" [, flag = 0] )
参数
filename
|
目标文件的完整路径与文件名称
|
flag
|
[可选]
$FN_FULLPATH (0) - 默认
$FN_RELATIVEPATH (1) - 文件可以是相对路径如 "..\file.txt"
常量定义在 FileConstants.au3
|
返回值
成功:
|
返回完整路径和文件名称.
|
失败:
|
返回参数值, 设置 @error 为 1.
|
函数示例
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Create a constant variable in Local scope of the filepath to retrieve the longname of.
Local Const $sFilePath = @HomeDrive & "\PROGRA~1" ; Generally this is the same as @ProgramFilesDir.
; Display the long path+name of the program files directory.
MsgBox($MB_SYSTEMMODAL, "", FileGetLongName($sFilePath))
EndFunc ;==>Example
----------------------------------------
该函数可以通过命令 exect 调用
参见:
FileGetShortName
exect=$var_spath=FileGetLongName('D:\TCIMAG~1\')||_ViewValues('$var_spath') ;; 返回长路径"D:\TC IMAGE"
© Аверин Андрей для Total Commander Image Averin-And@yandex.ru
|