ファイル情報を表示する

サンプルソース

<%
Set objFso = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFso.GetFile("c:\a.txt")

Response.Write "作成日時:" & objFile.DateCreated & "<br>"
Response.Write "更新日時:" & objFile.DateLastModified & "<br>"
Response.Write "サイズ:" & objFile.Size & "<br>"
Response.Write "タイプ:" & objFile.Type & "<br>"
Response.Write "属性:" & objFile.Attributes & "<br>"

Set objFile = Nothing
Set objFso = Nothing
%>

解説

Scripting.FileSystemObjectはファイル操作をするオブジェクトです。
GetFileで指定されたパスのファイルオブジェクトを取得します。




ファイル操作



ASPサンプル集
基本

ディクショナリ操作
<<すべてのサンプルをみる>>

ASPリファレンス

ファイル操作オブジェクト


Copyright (C) ASP@Workshop All rights reserved.