FileDateTime$函數

用於傳回檔案的日期與時間。

格式
FileDateTime$ (檔名)

參數

檔案名稱
以字串指定要確認的檔案名稱。包括驅動器名稱和路徑名稱。僅指定檔名時,即指目前目錄中的檔案。詳細內容請參閱ChDisk。

注意


可使用網路路徑。


傳回值
用於以下列格式傳回檔案的最後修正日期與時間。

月/日/西元年號 小時:分:秒

參照
FileExists、FileLen

FileDateTime$函數範例

String myPath$
myPath$ = "c:\TEST\TEST.DAT"

If FileExists(myPath$) Then
    Print "Last access date and time: ", FileDateTime$(myPath$)
    Print "Size: ", FileLen(myPath$)
EndIf