View Full Version : query referenced mayaBinary files

04 April 2006, 06:25 PM
hi eveyone,

Does anyone out there know the proper command to query all referenced mb files in a scene.

file -q -l -type "mayaBinary" still returns ALL referenced files.

Thanks in advance.

04 April 2006, 08:01 PM
thats a good question, the query command doesn't work if you give it a type to query even with:

file -q -r -type "mayaBinary";

it doesn't want to do it

so here is what I did. This will do the same thing just a work around. this will only print out the maya binary files that are referenced. if you want the entire file list including the current scene, then you can change the -r flag to the -l flag

string $fileList[];
$fileList = `file -q -r`;
for($file in $fileList){
string $fileExt = `match "[^\.]*$" $file`;
if(tolower($fileExt) == "mb"){
print ($file + " is a maya binary \n");

so do what you want inside the if statement for that maya binary

if anyone else has a better plan, i'd like to know as well

Goodl luck!

04 April 2006, 02:11 AM
Thanks Scott,

That should work nicely. It's unfortunate however that the -type flag doesn't want to behave.

CGTalk Moderation
04 April 2006, 02:11 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.