Forums > MaxMSP

Relative Paths

October 30, 2008 | 3:12 pm

So I have this:

C: Drive
|
|——-Max APPLICATION FOLDER
| -EXE dlls etc
|
|——-MIDI FIle Folder
-MIDI FIle

normally I would think (read ../MIDI File Folder/Midi File)
would be the relative path from the EXE to the MIDI file. Doesn’t seem to work. What’s up with that?

Thanks

Windows XP SP3
MAx/MSP/Jitter 5.0.5


October 30, 2008 | 6:29 pm

On 30 oct. 08, at 16:12, Jon Grant wrote:

> So I have this:
>
> C: Drive
> |
> |——-Max APPLICATION FOLDER
> | -EXE dlls etc
> |
> |——-MIDI FIle Folder
> -MIDI FIle
>
> normally I would think (read ../MIDI File Folder/Midi File)
> would be the relative path from the EXE to the MIDI file. Doesn’t
> seem to work. What’s up with that?

You can construct absolute path. For that you will need to get the
location of your application by using the max sendapppath message, and
generate the proper file path using sprintf or combine.

HTH,
ej

– Pasted Max Patch, click to expand. –

October 30, 2008 | 6:42 pm

Also, I’d be curious if it worked if you first put a single dot before the two dots like this:

"./../Midi File Folder/Midi File"

Rob


October 30, 2008 | 8:03 pm

./../

totally worked to go to a parent folder

YEAH!


October 30, 2008 | 9:50 pm

Hmm…doesn’t work for me. Relative paths (with or without a "./") work for me on OS X, but not on Windows (Windows Server, XP, or Vista). This severely affects the portability of patches, especially when sending to Microshaft-based machines. Any ideas?

Thanks!


October 30, 2008 | 9:59 pm

Perhaps you can post a specific example of what didn’t work?

Thanks,
Rob


Viewing 6 posts - 1 through 6 (of 6 total)