Skip Missing Reference

I have some automated scripts to batch process many files.. every once in a while the batch process hits a file that is missing a reference and causes the batch process to stop, in my case these references are irrelevant to my needs.

to open files I use this line
file -force -o "C:/###/##/##.mb";

Is there any way to force it to ignore or skip any missing references so it can continue on with my process??

thanks!

'catch' your file open command, which will allow it to keep running even if that fails.

Example, (I didn't test this, but it's the general idea)

[codebox]string $path = "c:/bla/bla.ma";
int $caught = catch(eval("file -force -open \"" + $path + "\""));
if($caught)
warning ("File didn't open: " + $path)
else
{
// your code
}[/codebox]

thanks..
but that doesn't seem to do it.. I still get the Missing Reference Dialog..

file -prompt false

Will disable the prompt dialog and it will stay disabled until you reenable it with file -prompt true (i.e. once you disable it, no file commands will display the prompt dialog)

Good call, forgot about that one. I use it a lot in my own batch code.

Perfect!!!
Thanks alot..