Search for FileType and Creator via shell

Hi,

can i list quarkxpress files in a folder (with subfolders) via shell?

list folder with subfolders about the finder is very slow! :frowning:

Many thanks for your help!

You could use either “find” or “locate”. I don’t know what the Quark Express file ending is so in these examples I’m searching for all text files (*.txt) in my Documents folder and subfolders. Adapt it to your needs:

do shell script "find ~/Documents -name '*.txt'"

locate” is much quicker than “find” because it searches its own database, but that database needs to be kept up to date by running the command “sudo updatedb” in your terminal.app every so often.

do shell script "locate '*.txt' | grep 'Documents'"

Hi,

i need to search for the filecreator (XDOC)!
There gives many files on the folders without a file ending and i must search for the filecreator!

How can i search fast quarkfiles?

Many thanks for your help…

All I can suggest is to build a script around GetFileInfo. It’s installed with your Developer Tools:

“/Developer/Tools/GetFileInfo”

Use the -c flag to get the file creator and the -t flag to get the file type.


Also, there’s a neat little utility called finfo which does more or less the same as GetFileInfo but is smaller and seems faster to me. You can download it and its source from:

http://www.ed.com/osx/finfo.html