Sending Selected Files To A Specific Program

I'm wanting to simulate dragging and dropping several files to the shortcut of a program.

I've looked for a while and can't find an example button to do something that simple.

Point me in the right direction?

I want to "send" or "open" all selected files to a specific file renamer in the Programs folder, which normally I would accomplish with a rightclick context menu.


Depends how the program works. Does it have a command line interface?

You can call some context menus as well but using the command line is much easier, if it has one.

(Does the renamer do something that can't be done in Opus's own renamer?)

The program is Better File Rename, which makes no mention of a command line interface that I can see on their website.

If DOpus could add an incrementing sequence of numbers to the beginning of each selected filename, with appropriate padding, I'd gladly use that - but unless someone programmed the button 100% for me, I think that would be well beyond my skills to create!

I normally just select files, right click, and BFR is there in the context menu waiting for me. Dragging files onto the shortcut icon achieves the same thing.

Probably this is what you are looking for: [Multiple rename numbering)

Or when you would like to create a button, try this code:

@nodeselect @set Start={dlgstringS|Number the first selected file (use leading zeros to pad):|01} @set By={dlgstringS|Increment file numbers by:|1} Rename NUMBER="{$Start}" BY={$By} PATTERN="*" TO="[#]-*"

you know what?

It's working!

Thanks sir.

Now I just wish I understood how.

hi everybody, my windows file renamer utility of choice (i've even donated for it :opussanta: ) is J.M. Falcao's flagship product the freeware "File Renamer" (what a generic name i know!), Rename.exe, 238KB: the little GUI-window supports drag'n drop (of mixed items: files+folders), nice!

In DO10, i've dropped the Rename.exe to the Customize toolbar and Edited the button (e.g. replacing the %1 with {allfilepath$} or {filepath$} ) but instead of accepting the selected items as "dragndrop input" the freeware interprets my DO10-button command as command line (and thus tries to rename the selected files, argh!). i've certainly read but..

i am sure that i am not the only one who knows of this great file renaming utility. Please share the working button, once someone has figured it out. I am new to programming DO10 buttons!

That's because it is a command-line. :slight_smile: Opus passes the names of the files to the other program via the command-line.

Does the other program have a command-line mode that lets you pass it a list of files?

As far as i can see, JMFalcao's tool does have a command-line mode but we dont want that. the windows GUI is the powerful side of it.

[quote]Accepts a command line with the format
'renamer.exe <path_to.files/oldname1> '
always as a pair of names 'old'--'new' , as many as you need, separated
by spaces.

And it can create a new windows explorer context menu item so that
you can right click on Explorer and directly send all selected files
or directory names to be renamed into the program.[/quote]

Since it is possible to integrate JMFalcao's tool (in its Options/Settings) into the explorer shell (right-click context menu on mixed items), it should be possible to create a DO10-button for it. How do i do?

You might be able to invoke its context menu via a button. Depends how its done. (You can definitely invoke it via right clicking the files.)

Out of interest, what kind of thing do you want to do that Opus's own rename tool doesn't do? Or is it just what you're used to?

After regular installation of the tool, the context menu is already there, as we can see. So there's no actual need for a DO10-button. but please, let's do it nevertheless: If the user does not select items and hits the DO10-button, then the tool would just launch. (Yes, it is "just" what i am used to. i find it more convenient and powerful (or easier/faster to use) than OP10's integrated file renamer. maybe with time i will switch. but since i am new to Dopus.. i would like to use my old tool and learn about programming this button)

With a file selected, you can usually use ContextMenu SHOWCMDS to get a list of available context menu commands for a particular (type of) file, and then use ContextMenu VERB="xyz" to create a button which runs one of those commands.

Depends how the program's context menu is implemented, though. Microsoft, in their wisdom, have provided about 5,000 (well, not quite, but it feels like it and they keep adding more with each version of Windows) different ways for programs to add context menu items, with varying ways to harness those things outside of actual context menus.

thanks for your comments leo. i guess i will give up on this if nobody can post the solution (button code). i cant figure it out on my own (although the tool looks so simple and i am not asking very much from DO10): DO10 should pass on the selected mixed items as if i had drag'n dropped them in the open window of that tool.

Doesnt sound too hard to me. DO10 should be able to do it. I just dont know the button code. You cant look into this (in detail), can you? i might be asking too much, i am a newbie, so please forgive or ignore :sunglasses:

It doesn't seem possible with that particular program. If you have donated money to him maybe you could leverage that and ask him to add a command line option that lets it accept files for the GUI from the command line.

Or, you could just use the rename functions built-in to Opus, which look like they can do anything this program can.

jon, that's what i wanted to know/hear. thanks so much for having looked into it. i can now live in peace :laughing: and go on with life (i.e. the reading of the remaining DO10 help file pdf). i will send the author a link to this thread .. he might not be very interested in it since the windows explorer shell's right-click context menu (which works in DO10 too!) is practically as comfortable as a separate DO10-button.

now i am learning that DO10 cant do everything what i had expected (even though it's not DO10's fault here). good to know -- i have to adjust my Dopus phantasies :slight_smile:

Seems to be a nice little tool and I would probably also use it if I wouldn't have DOpus. The context menu can't be applied on a 64bit OS. I think you shouldn't waste your time creating this button if you have a working context menu but have a look on what DOpus can do instead.

I understand that you find the integrated file renamer less comfortable than your tool. But you can do much more things with DOpus. I'm using a large collection of Buttons to make things easier. You'll find a Button for each feature your tool offers and much much more in the "Rename Scripting" section.
My collection contains about 70-80 Buttons (I did'nt really count) placed in one Menubutton with 9 Submenus. Nobody really needs them all but you will find everything you need to create your own collection. And you will find some buttons doing things you never dreamed of.
This collection can be downloaded from the german forum but the Button names, descriptions and tooltips are all in german language. If you understand german (or translate it with google) you could have a look at this topic:

thanks kundal, very nice post. i will install the German toolbar (although i will continue to prefer, i am sure, the flexibility and compactness of the Falcao tool) for educational purpose. If i have a semi-challenging renaming task in mind, then looking thru "80" buttons and then taking 80 yes/no decisions is exactly what the Falcao tool is to avoid. You rename in different basic steps and can undo each step safely. and it's all compact and VERY ├╝bersichtlich. Anything (e.g. a menu) with 70 items, i wouldnt call that "compact". Thanks again, i will definitely study the German thread since i want to learn. So this thread is about "Sending Selected Items To A Specific Program", let's not drift offtopic then ("The Best Integration of Renaming Functionality"). Good job, everybody!!

Yay, the new version of the tiny tool has a command line switch which accounts for the desired function. The switch is -sendto . Now it works perfectly: Select folders (or files) which you want to rename, right click the 2-way Dopus button and set you are!

While the native Dopus Rename dialogue is more flexible, advanced and powerful than the Falcao freeware tool, users who dont wanto "to code" or learn regex are probably better off with the latter option.. because it is REALLY easy to use. And fun too! (and it too has scripting capability, see the bottom of the tool).