You have a list of files: file1.jpg, file5.jpg, file9.jpg You need change their filenames so that they are in sequential order, without any numerical gaps.
file1.jpg, file2.jpg, file3.jpg
You may only use a windows .bat script to accomplish the task.
How?
Attached: CNNvDtrump.jpg (600x319, 45K)
January 15, 2019 - 20:58
i dont code lol i only play vidya and shitpost here :)
January 15, 2019 - 20:59
@echo off ren file1.jpg file1.jpg ren file5.jpg file2.jpg ren file9.jpg file3.jpg
January 15, 2019 - 21:01
what if there are a million files?
January 15, 2019 - 21:03
The question never asked for that.
January 15, 2019 - 21:07
@echo off ren file1.jpg file1.jpg ren file5.jpg file2.jpg ren file9.jpg file3.jpg ... ren file4865759.jpg file9999998.jpg ren file5676376.jpg file9999999.jpg ren file1471638.jpg file1000000.jpg
January 15, 2019 - 21:07
I use vim to copy and modify the line a million times with a single macro
January 15, 2019 - 21:08
power shell Dir | %{Rename-Item $_ -NewName ("file{0}.jpg" -f $nr++)}
January 15, 2019 - 21:12