Difference between revisions of "File Name Manipulation"

From Tomelec
Jump to: navigation, search
(Created page with "= Create numbered symlinks to files = This creates a symlink to each .jpg file in ../frames starting from 000001.jpg. Useful for image sequences. <nowiki>i=0; for file in ../...")
 
(No difference)

Latest revision as of 05:45, 19 June 2016

Create numbered symlinks to files

This creates a symlink to each .jpg file in ../frames starting from 000001.jpg. Useful for image sequences.

i=0; for file in ../frames/*.jpg; do let i=i+1; ln -s $file ./$(printf "%06d.jpg" $i); done

Inspiration and discussion on Stackoverflow!