1

Fixing a few thousands filenames on linux

view story
linux-howto

http://stackoverflow.com – I have extracted clips from a video with ffmpeg, following this pattern 'clip-%4d.png'. This has yielded files like: clip-0001.png, clip-0002.png and so on. I have then applied many filters with imagemagick "convert" to those pictures, and it ran for a couple hours. I realised my list order is broken after clip-9999.png, it becomes clip-10000.png and up to clip-40000.png, successfully ruining my sequence of clips. I would like to convert all my clips to follow the sequence clip-00000.png, clip-00001.png up to clip-40000.png. I could restart the whole process using pattern 'clip-%5d', but (HowTos)