ParentFolder

(PWS4 IIS4 IIS5)
ParentFolder — 指定されたファイルまたはフォルダが格納されているフォルダを表す Folder オブジェクトを返します。値の取得のみ可能です。

構文

object.ParentFolder

パラメータ

object
File オブジェクトを指定します。

戻り値

ディレクトリ名を返します。

説明

ファイルがあるディレクトリ名を返します。

JScript

1
2
3
4
5
6
7
8
9
10
11
function ShowFileAccessInfo(filespec)
{
   var fso, f, s;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   f = fso.GetFile(filespec);
   s = f.Name + " + f.ParentFolder + " に格納されています。<br />";
   s += "
作成日時 : " + f.DateCreated + "<br />";
   s += "
最終アクセス日時 : " + f.DateLastAccessed + "<br />";
   s += "
最終更新日時 : " + f.DateLastModified;
   return(s);
}

VBScript

1
2
3
4
5
6
7
8
9
10
Function ShowFileAccessInfo(filespec)
   Dim fso, f, s
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.GetFile(filespec)
   s = UCase(f.Name) & " & UCase(f.ParentFolder) & " に格納されています。<br />"
   s = s & "
作成日時 : " & f.DateCreated & "<br />"
   s = s & "
最終アクセス日時 : " & f.DateLastAccessed & "<br />"
   s = s & "
最終更新日時 : " & f.DateLastModified
   ShowFileAccessInfo = s
End Function