0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ファイル詳細一覧

Last updated at Posted at 2015-08-01

指定ディレクトリ配下の詳細一覧を出力するワンライナー

dirコマンドで取得したフルパスをforの変数に突っ込んで出力するまでは割と既知。
その変数の文字列をechoで標準出力する時に~でファイルパス属性の文字列として処理できるらしい。

@echo off
echo.>out.txt
for /f "tokens=* usebackq" %%a in (dir /a /b /s /o:n /t:w ) do (echo.%%~aa %%~dpa %%~nxa %%~ta %%~za ) >>out.txt

やってみたらデキた。
割と目から鱗。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?