View Single Post
Old 29-Nov-2007, 03:04 AM   #1 (permalink)
Anilrgowda
Administrator
 
Anilrgowda's Avatar

Posts: 18,715
Join Date: Jan 2006
Rep Power: 10 Anilrgowda is on a distinguished road

IM:
Default List of files that exclude some files

I wanted to see if there was an easy way to use say the find command in linux to build a list of files that I can process with Imagemagick

Reason is I am periodically searching a folder e.g. /foo/* for jpg files that have not been processed. A processed file will have an accompanying with the same filename but different extension. This file denotes that the jpg was previously processed. I want to then ignore this file the next time I process the folder. So, I would like to be able to:

List all jpg files that do not have an accompanying file. E.g. in a folder, their contains files, a.jpg, b.jpg, c.jpg, d.jpg, d.mod. I would like a list of files in that folder that would exclude the d.jpg file, leaving a.jpg, b.jpg, c.jpg.

Want to be able to process a folder recursively.

Either throw all the files to a list file, to then process through with a loop or possibly execute the command inline with the search. E.g. the command I can run to process and replace the existing jpg file is mogrify quality 50 /path/to/foo.jpg > /path/to/foo.compressed

Any help would be greatly appreciated.


------------------


Anilrgowda is offline   Reply With Quote