I have broken it up due to Reddit formatting not wrapping the line otherwise.) To actually answer the question as asked (though, as others point out, there are often better tools available):įor %h in (0 1 2 3 4 5 6 7 8 9) do for %t in (0 1 2 3 4 5 6 7 8 9) do for %u in (0 1 2 3 4 5 6 7 8 9) do ren "00%h%t%u Real ESRGAN zoomed x4.png" "%h%t%u.png" I don't have access to a windows machine so I can't check what the equivalent commands are, but it should be possible to do something essentially the same. # Trial runĮcho mv -nv "$" "$(printf '%03d.png' $num)"Įdit: Just noticed this is for windows and not linux. I also like to add -nv to the mv command, -v so I can see what happened if something didn't go as planned, and the -n for no clobber prevents anything from accidentally getting overwritten. If you're nervous about screwing things up, do a trial run with echo mv first to see what the actual commands will be. I've done this a shit tonne with tv shows when the format isn't right for kodi to recognize seasons and I need to make sure that everything fits the S01E01 format. ![]() Bonus points if you use printf to get the right number of digits in the destination file.
0 Comments
Leave a Reply. |