[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OT: running a command on many files in many subdirectories



I'm sure this is simple, but maybe someone here can help me do it in a few 
minutes instead of hours.  I have a bunch of files in a bunch of 
directories, and I want to run the same command on each of them.  For each 
input file, the output file should have the same name except ending in .txt, 
and the output files should be put a common directory.  ie,

java ImageInfo dir1/pic1.jpg > commondir/pic1.txt

etc, repeated over a bunch or directories and jpg files.  The subdirectories 
only go one deep.  

If this is difficult I could copy all the jpg files into a single 
directory first with only a little bit of tedium.

Thank you, Levi



Reply to: