资 源 简 介
fordo 0.1 by Lars (songcq@gmail.com), updated at Nov 20th, 2010
Usage
fordo files -c command [arguments]
Description
Run command on a list of files. Before running command,
{} is replaced to the file name;
{n} is replaced to file counter starting from n; (n can be any number)
{s/ab*c/ac/g} is replaced to the result of "sed "s/ab*c/ac/g"" on file name; (any other sed scripts also work)
Examples
To convert all bmp files to jpg format: (convert is a command from ImageMagick)
Convert files to 100.jpg, 101.jpg, 102.jpg ...
fordo *.bmp -c convert {} {100}.jpg
Keep the original basenames
fordo *.bmp -c convert {} {s/bmp$/jpg/}
Move all text files in subfolders to curren