opening a folder with an / in the name

Feb 21, 2013 at 11:19pm

opening a folder with an / in the name

Hi everyone, I have adapted a patch from this post http://cycling74.com/forums/topic.php?id=10129 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:

– Pasted Max Patch, click to expand. –
#66658
Feb 21, 2013 at 11:20pm

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! :)

#239918
Feb 22, 2013 at 5:39am

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.

#239919
Feb 22, 2013 at 8:27am

this isnt your question, but i i would try to avoid using folder names on mac which wouldnt work on windows. :)

#239920
Feb 22, 2013 at 9:14am

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 :)

#239921
Feb 22, 2013 at 11:13am

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.

#239922
Feb 22, 2013 at 8:00pm

I hadn’t tried it either, Barry. :

#239923
Feb 22, 2013 at 8:46pm

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!

#239924
Feb 22, 2013 at 8:47pm

#239925
Feb 22, 2013 at 10:01pm

Windows does not allow any kind of slash in a folder or file name.

#239926
Feb 23, 2013 at 6:42am

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.

#239927
Feb 23, 2013 at 8:48am

You can use regexp to look up for “forbidden” characters:

– Pasted Max Patch, click to expand. –
#239928

You must be logged in to reply to this topic.