How to Open a Folder on Windows Using "; max launchbrowser"

Wes's icon

1. Right-click on the folder you wish to open and select "Properties"

2. Copy the file path name from "Location" in "Properties"

3. Open Notepad

4. Paste the path name into the Notepad document

5. Add a "\" and type the exact name of the folder. (You can copy and paste the folder name from the top of the Properties window.) This gives you the full file path for the folder.

6. Type "start" (without the quotes) and a space before the full pathname (i.e. start C:\Users\JPC\Desktop\myfolder)

7. Save the file as a .bat file. (i.e. "openfolder.bat")

8. Open Max and add a message box that says "; max launchbrowser [path name of .bat file]" (without the quotes). (i.e. ; max launchbrowser C:/Users/JPC/Desktop/openfolder.bat). In the Max message, you will use "/" instead of "\"

Chloe Alexandra Thompson's icon

Hey Wes! Thanks for this post, it’s really helpful! I just wrote a post about some things that might be missed in integrating .bat scripts to your Max patch if you are new to Windows or programming and included a link to this post here: https://cycling74.com/forums/using-launchbrowser-to-run-batch-bat-scripts-on-windows

Wes's icon

Hi Chloe! It's been a few years since I've been running Max on Windows so I'm a little out of practice with its nuances now. But when I do again, this will be incredibly helpful. Thanks so much!

TremensS's icon

Hey there,

I'm trying to do exactly that: be able to bang a message that pops up a Windows Explorer to a specific folder.

1. I have tried the above with the separate .bat but nothing happens
- my destination folder is "D:/myfolder"
- I created a "D:/launch.bat" file containing "start D:\myfolder", tried also without start ("D:\myfolder" only)
- in Max, created a message containing "; max launchbrowser D:/launch.bat"
But nothing happens.
Do you have any idea/advice?

2. Isn't there a way to not have the .bat file step? My destination folder will vary dynamically in my app and it would be lovely not to have to update the .bat file each time

Thanks for your help!
T

Source Audio's icon

On Mac launchbrowser file works well.
Not on windows.
But you can use shell object

Max Patch
Copy patch and select New From Clipboard in Max.


TremensS's icon

Works like a charm, thanks so much for the snippet! 👏
T