enumerateFiles and current working dir


#1

Hi

Im confused… :frowning:

I am writing a cleanup script for the max scenes here, they are a mess -__-

So my confusion comes when I absolutely know that a texture is missing because the path is point to someones desktop… sigh, and yet when i run

–This is not my code
–I got it from a script that bobo wrote so im sure it works :slight_smile:

fn get_names name a = 
(
	append a name
)
files = #()
enumerateFiles get_names files #missing

It does NOT return the offending file?! Weird right?
It does however return other files that are missing…

The really weird this is that when I click the bitmap button of the texture that is pointing to the someone else’s desktop, there is a texture file named correctly in the folder that max is opening (CWD?), is max using this one and ignoring the path displayed in the UI?

When i merge the file into a new max file the texture is still pointing at the a someone else’s desktop, but when i click the bitmap button there is no image in the folder that max opens.
Now when running the code above the missing file gets added to the array.

Any help understanding why this is happening would be great, i dont really want to merge all the scenes, scripted or otherwise, into clean max files, seems a little dangerous, and what if the CWD just happens to have the texture that max is looking for??? Then i would not get a correct “missing” list back from the enumerate

Thanks in advance
d.b


#2

The file status is most probably #found, I guess it’s in the (sub)folder of the original maxfile you are working with (which, along with custom maps path, is where max looks when it doesn’t find the file at its path). When you merge it to a new maxfile (different working directory), the file is no longer in the same location as the maxfile and the status is #missing.


#3

ok that makes sense, thanks

I ironically want to turn that off, is there a way that if max doesent find the file at exactly the use specified path then it wont look for it anywhere else?

thanks


#4

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.