home.social

#filesysteminfo — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #filesysteminfo, aggregated by home.social.

fetched live
  1. 検証用ファイルやサンプルデータを作っていると、作成日時・更新日時・アクセス日時をまとめて揃えたい場面があります。

    PowerShellなら CreationTime / LastWriteTime / LastAccessTime を使って、カレントディレクトリ配下のファイルを一括変更できます。

    -Recurse でサブフォルダー込み、-Filter で特定拡張子だけ、-File を外せばフォルダー自体も対象にできます。
    元の日時は基本戻せないので、実行前のバックアップは大事です。

    chun-log.jp/powershell-file-ti

    #PowerShell #Windows #コマンド #GetChildItem #ForEachObject #FileSystemInfo #タイムスタンプ #WindowsTips