Context menu application to act on selected files.

K

Karl

Hi all,

I want to write an application that is launched from the context menu
in Windows Explorer/Computer. That is to say, when I am browsing
around my hard drive and get to any location I choose, I want to be
able to select several files, right click my mouse and launch an
application which will act on the selected files.

However, I don't even know where to start and have a number of
questions!

How do I get the list of files to pass into the application? Is this
done on the Command line and if it is, how do I pass the names of the
selected files into it? I've seen "%1" etc thrown about but don't
understand it. Also is it possible to pass the folder the files are in
to the application so any edited files can be saved to the same
location of a dynamically created folder within the launch one?

Also, how do I get the application to create a context menu item when
it installs? I've never created this kind of application before (one
that launches from the context menu) and have no idea how to do this.


I'm sure Ill have many more questions, but these will do for now and
should get me off the ground.

Thanks
 
K

Karl

Google "adding context menu to windows explorer"

Thanks Ashot, Im going to look into this shortly. I'd like to know how
I create an install for my app that would write such a registry entry
relevant to the install location of the app.

In the meantime, I've started to write my app and have managed to get
it to launch and take command line parameters or arguments, but need
to be able to capture the folder windows explorer is browsed to. All
I'm getting at the moment, is the location of the exe file and a list
of the parameters. Remember Im trying to act on selected files and
save them back to their original location. How do I do this? Just had
a thought as I'm writing... would this be captured in "%1" when the
app is launched via the context menu?

Thanks for your help again...
Karl
 
K

Karl

Google "adding context menu to windows explorer"

I was playing around with some code samples I found online yesterday
regarding adding context menus and found one that seems to appear in
the context menu when you right click on a folder. However, I need to
have a context menu when I right click on image files (pref jpg/jpeg
and if poss gifs) Are there any samples of how to add context menus to
specific file types?

Thanks again.
 
K

Karl

I was playing around with some code samples I found online yesterday
regarding adding context menus and found one that seems to appear in
the context menu when you right click on a folder. However, I need to
have a context menu when I right click on image files (pref jpg/jpeg
and if poss gifs) Are there any samples of how to add context menus to
specific file types?

Thanks again.

Does anyone know where I can find examples of this?
Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top