Strippath and mutliple files in search path
I have a question/remark about the ‘strippath’ object. Having the following situation :
In this ‘patch.maxpat’ there is a ‘strippath’ object and attached as input is a message with the text
Now when I click on the message the following messages/warnings appear in the max window :
"Warning: you have multiple files in your search path with the name text.txt"
" using this file: C:/test/folderOne/text.txt"
The first message seems a bit redundant. I know exactly what path I passed in. Don’t really care about other files in other folders even if they can be found in my search path.
The second one doesn’t really make sense to me, what does ‘using’ mean in this sense. Also I passed in the
fullpath, although the other ‘text.txt’ appears earlier in the search path, it seems to me I’m really talking about the one in ‘folderTwo’.
What should I make of these 2 messages exactly?
Once you use [strippath], there is no way for Max to know which file
called "text.txt" in its search patch is supposed to be used. That’s
why there is a warning and also why you’ve been told which one Max
decided to use.
It may be a better idea to use full pathnames and avoid [strippath].
On 27 juin 08, at 15:11, So9 wrote:
> I have a question/remark about the ‘strippath’ object. Having the
> following situation :
> In this ‘patch.maxpat’ there is a ‘strippath’ object and attached as
> input is a message with the text
> Now when I click on the message the following messages/warnings
> appear in the max window :
> "Warning: you have multiple files in your search path with the name
> " using this file: C:/test/folderOne/text.txt"
Centre de Recherches et de Formation Musicales de Wallonie asbl
this seems like expected behavior to me.
i don’t know exactly what strippath does, but with a name like strippath it seems to me that it would strip the path out of the message and leave only the file name in which case you would be left with "text.txt"
im not exactly clear on the technical how here, but max knows what files are in your search paths by name, not path. the paths max looks for files in can be set in the options menu (i think) well you can set them somewhere (sry at work). Anyway this is how when you make a patch called mypatch.maxpat (or whatever) and type that into an object box you patch populates it. i assume its so that your object wouldn’t have some name like \diskusersuser.namesomefoldersomesubfolderblahblahblahthefilename.ext
among other reasons i’m too tired to think of.
so about the errors:
if strippath does what it sounds like, as far as max is concerned you do have 2 files with the same name. they need to either be unique or it sounds like you don’t actually want to strip the path…
the second error is a courtesy message so you know what the path of the file your object did load is.
sry if this is a less than caffeinated explanation.
I see, that does make more sense.
I was just abusing the strippath for some files to be checked, but I can deal with that easily in a different way.
On 27 juin 08, at 16:20, So9 wrote:
> I see, that does make more sense.
> I was just abusing the strippath for some files to be checked, but I
> can deal with that easily in a different way.
There’s an example in the help file which uses regexp to extract the
file name from a "string" point of vue (strippatch verify that the
file exists for instance).
A slightly related question about these error messages:
When I have a ‘umenu’ object and have filled in "TEXT" for the ‘file types’ (inspector->files->File types) and I load a folder it does give me these messages (warning/using this file) too, when multiple files with the same name exist in the search path ofcoures.
These messages don’t appear when I don’t fill in any type for in the file types.