Notice: Constant SAVEQUERIES already defined in /home/uwsc/domains/uwsc.jp/public_html/wp-config.php on line 125

Notice: 関数 wp_add_inline_script が誤って呼び出されました。<script> タグを wp_add_inline_script() に渡さないでください。 詳しくは WordPress のデバッグをご覧ください。 (このメッセージはバージョン 4.5.0 で追加されました) in /home/uwsc/domains/uwsc.jp/public_html/wp-includes/functions.php on line 5905

Notice: Undefined variable: post in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 147

Notice: Undefined variable: post in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 154

Notice: Trying to get property 'ID' of non-object in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 154

Notice: Undefined index: description in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 200

Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 200
File.Type プロパティ | UWSC辞典

File.Typeタイプ プロパティ

本ページには広告が含まれています。


Notice: Undefined offset: 1 in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 188

Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 47

Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 47

Notice: Undefined variable: id in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 61

Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 27

Warning: in_array() expects parameter 2 to be array, null given in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 41

Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 23

ファイルの拡張子を取得します。

構文
File.Type
引数
戻り値

File オブジェクトを返すメソッド・プロパティ

FSO.GetFile メソッド
指定したパスのFile オブジェクトを返します。
File.Type プロパティ
コレクションから単一のオブジェクトを返します。

関連するメソッド・プロパティ

.png
項目メソッド・プロパティ
種類
場所
リンク先ShellLinkObject.Path プロパティ (Shell)
作業フォルダーShellLinkObject.WorkingDirectory プロパティ (Shell)
ショートカットキーShellLinkObject.Hotkey プロパティ (Shell)
実行時の大きさFile.Type (Shell)
コメントFile.Type (Shell)
.png
項目メソッド・プロパティ
.png
項目メソッド・プロパティ
名前File.Type プロパティ
種類File.Type プロパティ
フォルダーのパス
サイズFile.Size プロパティ
作成日時File.Type プロパティ
更新日時File.DateLastModified プロパティ
属性File.Type プロパティ
所有者Folder.GetDetailsOf メソッド (Shell)
コンピューター
.png
項目メソッド・プロパティ

プログラム実行例

指定したフォルダ内の拡張子とファイルの種類を返す

UWSC
DIM FSO = CREATEOLEOBJ("Scripting.FileSystemObject")
DIM folderspec = "D:\Desktop\"
DIM Files = FSO.GetFolder(folderspec).Files

FOR File IN Files
	PRINT FSO.GetExtensionName(File.Name) + ":" + File.Type
NEXT
使用関数

関連記事

GETDIR関数 (スクリプト関数)
ファイル名を取得します。
DELETEFILE関数 (スクリプト関数)
テキストファイルを削除します。
FCLOSE関数 (スクリプト関数)
テキストファイルを閉じます。
FDELLINE関数 (スクリプト関数)
テキストファイルの指定行を削除します。
FGET関数 (スクリプト関数)
テキストファイルの読み込みを行います。
FOPEN関数 (スクリプト関数)
テキストファイルを開き、ファイルIDを取得します。
FPUT関数 (スクリプト関数)
テキストファイルの書き込みを行います。
POSACC関数 (スクリプト関数)
座標位置の文字(情報)を取得します。
FSO.GetFolder メソッド
指定したパスのFolder オブジェクトを返します。
small関数 (自作関数)
配列の中で小さい方から数えた順位の値を求めます。