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 1 year has passed since last update.

Windows Powershellでフォルダ内のファイルを連番リネームするコマンド

Posted at

対象のファイルがあるディレクトリに移動し

ls | sort {$_.CreationTime} |
% {$i = 1} { $NewName = "{0:0}.jpg" -f $i; mv $_.Name $NewName; $i++ }

.jpgの部分はお好みで

sort [???]の部分で何を基準に連番するかを決める。
例は[作成日でソート] -> [連番採番]

ソートタイプについてはこちらを参照

参考

フォーマットを変えればいろいろできるようです。

こういうのすらかなり調べないと出てこないWindows君さあ...

0
0
0

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?