opening a folder with an / in the name
Hi everyone, I have adapted a patch from this post https://cycling74.com/forums/maxmsp-file-browser I would like to load up a file that has a "/" in the title. When I try to do this nothing loads. I know why this is happening but I can't work out a fix, any help would be appreciated. To replicate this you will need to make a file on your system with an "/" in it, something like "test/test" and with some audio files in it. Here's the patch:
p.s I know that I can change the name of the folder, removing the "/" to make this work, but I am building a system that can't assume that the user will know they need to do that! :)
have you tried escaping the forward slash with a backwards slash? Either way, it's always a bad idea to have a slash in a file or folder name.
this isnt your question, but i i would try to avoid using folder names on mac which wouldnt work on windows. :)
thanks for the replies.
meeble, not sure how I can "escape the forward slash with a backwards slash?" Re the ill-advised naming, I know, but I'm designing a patch to be used by anyone, and it needs to be bullet proof! :)
roman, I am totally ignorant when it comes to windows, will windows not allow you to name folders with a "/"? If so that would be good :)
To my understanding max cannot deal with slashes in the names of either files or folders at all, never. I suppose you have to include a line about this in the manual. The conformpath object shows the different styles.
I hadn't tried it either, Barry. :
yeah, i guess I don't want to get hung up about it, your probably right jvkr, a line in manual will have to do. Thanks for the help guys!
Windows does not allow any kind of slash in a folder or file name.
Windows may impose restrictions on use of forward slashes and backslashes, but Mac OS does no such thing.
If you're writing patches for you own use, you can enforce your own discipline. If you're writing patches for other people to use, you can't.
Advice along the lines of "don't use <> in file path names" is of extremely limited value.
You can use regexp to look up for "forbidden" characters: