Change working directory (cd) to selected folder

Hi all,

I recently stumbled upon two great apps: MenuApp and ShortPopUp. These two programs allow you to browse seamlessly through your folder structures, and make it possible to "drill down" into deep folders and quickly view subfolders and files. They are also portable and very lightweight.

What I'm trying to accomplish is selecting a folder in the DOpus lister, and then telling Opus to run MenuApp from the selected folder. This would cause MenuApp to only show the subfolders & files of the selected folder (having launched it through Opus right-click context menu). To do this I need to change the working directory of MenuApp to the selected folder in the source. Currently, I'm able to force MenuApp (and ShortPopUp) to launch from the source path:

"D:\Portable\MenuApp\MenuApp.exe" cd={sourcepath}

However, when I try to change the working directory to the selected folder, it still launches from the sourcepath:

@nodeselect "D:\Portable\MenuApp\MenuApp.exe" cd={filepath}

Is it possible to specify the selected folder when running the cd command? I know some people on the forum (including myself) were missing qttabbar's feature of quickly drilling down deep folders via the right-click context menu. This would in essence duplicate that feature in DOpus, and would be more usable than the current workaround which is to use the "Cascading Folder Content" method. The big difference for me is that you would be able to double-click on a subfolder while browsing through the structure and it would open the folder in an DOpus lister. It also would avoid having to click on the tiny arrows at the end of each folder to continue drilling down into the folder structure. So does anyone know if there's a way to change the working directory of an app to the selected file in Opus?

You're not running the CD command in either of your examples. You're passing "cd=xyz" as an argument to MenuApp.exe.

Does MenuApp.exe understand/expect such an argument?

If you want to change the current directory to the selected folder before running MenuApp.exe then do this:

cd {filepath}
"D:\Portable\MenuApp\MenuApp.exe"

If it's a single-line command then you can also do it using the Simple button editor by simply editing the Start In field. (If you edit that field and then click Advanced, to switch to the Advanced button editor, you'll see it turn into a CD command.)

1 Like

Well, my last several posts are clear examples of why you shouldn't attempt to work out any coding when you've downed a bottle of wine, as well as a few other "substances". It all made sense at the time, but I eventually realized that things were not working when I started to execute a bunch of MS-DOS commands (that I made up), viscously crippling my computer. Leo, as always, thanks for correcting my blasphemous code :smiley: