- Dec
- 57
- 3
I had a bunch of video files I wanted to process:
File 1.mkv
File 2.mkv
File 3.mkv
...
...
...
File 24.mkv
So I did this:
set count=1
for %f in (file*.mkv) do (
mkvpropedit.exe "%f" --edit info --set "title=Video Number %count"
set count=%@eval[%count + 1]
)
It seemed to work, but later, I discovered that all the files, except number 1, were titled wrong. I eventually figured out that TCC doesn't count in proper numerical order when processing files. Instead, it counts like this:
File 1.mkv
File 10.mkv
File 11.mkv
File 12.mkv
File 13.mkv
File 14.mkv
File 15.mkv
File 16.mkv
File 17.mkv
File 18.mkv
File 19.mkv
File 2.mkv
File 20.mkv
File 21.mkv
File 22.mkv
File 23.mkv
File 24.mkv
File 3.mkv
Which for normal file copying/moving is fine and makes no difference. But in my case, it completely screwed everything up.
File 10 is labeled as 2
File 11 is labeled as 3
. . . etc.
Is there a way to force TCC to count in proper numerical order?
File 1.mkv
File 2.mkv
File 3.mkv
...
...
...
File 24.mkv
So I did this:
set count=1
for %f in (file*.mkv) do (
mkvpropedit.exe "%f" --edit info --set "title=Video Number %count"
set count=%@eval[%count + 1]
)
It seemed to work, but later, I discovered that all the files, except number 1, were titled wrong. I eventually figured out that TCC doesn't count in proper numerical order when processing files. Instead, it counts like this:
File 1.mkv
File 10.mkv
File 11.mkv
File 12.mkv
File 13.mkv
File 14.mkv
File 15.mkv
File 16.mkv
File 17.mkv
File 18.mkv
File 19.mkv
File 2.mkv
File 20.mkv
File 21.mkv
File 22.mkv
File 23.mkv
File 24.mkv
File 3.mkv
Which for normal file copying/moving is fine and makes no difference. But in my case, it completely screwed everything up.
File 10 is labeled as 2
File 11 is labeled as 3
. . . etc.
Is there a way to force TCC to count in proper numerical order?