GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Selected folder path as part of an argument?


#1

Is there a way to pass the path of the selected folder as part of an argument?

I'm trying to send *.gdi from the selected folder to an app using a button/hotkey.

The reason I want to launch this from the parent folder level instead of entering the folder and selecting the .gdi file directly is so I can take advantage of turning the folder to a CD thumbnail, and launch from there.


#2

Here is probably all you need:

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Codes_for_passing_paths.htm


#3

Thanks for the suggestion. I actually spent quite a bit of time with that (and other help pages) before posting my question. Unfortunately, it seems that all those arguments apply to current folder paths, not selected folder paths. Unless I'm misunderstanding something?


#4

It's just the normal {filepath} code, and similar Codes for passing filenames. They apply to selected files and folders.

Command modifiers can be used to restrict them to just files or just folders, but they do both by default.


#5

Thanks Leo. In that case, my problem is with passing a wildcard (*.gdi) to the program, which doesn't seem to work. So much for that idea :frowning:


#6

Are you looking for something like this?

image

dopusrt /argsmsgbox filepath is {filepath|..}\*.gdi

#7

Sorry, I'm not really sure what that screenshot is showing.

I want to select a folder, hit a button, and pass the .gdi file that is inside that folder to an application.


#8

That'd take a script, unless the .gdi file had the same name as the folder (or one that was trivially derived from it).


#9

Actually the .gdi has the same name as the folder.


#10

"{filepath}{file}.gdi"


#11

Bingo! Thanks Jon and everyone else :smiley: