469,920 Members | 2,331 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

Context menu application to act on selected files.

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

Nov 7 '07 #1
4 3956
Google "adding context menu to windows explorer"

"Karl" <go**********@cortexa.co.ukwrote in message
news:11**********************@d55g2000hsg.googlegr oups.com...
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

Nov 7 '07 #2
On 7 Nov, 21:32, "Ashot Geodakov" <a_geoda...@nospam.hotmail.com>
wrote:
Google "adding context menu to windows explorer"

"Karl" <googlegro...@cortexa.co.ukwrote in message

news:11**********************@d55g2000hsg.googlegr oups.com...
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
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

Nov 10 '07 #3
On 7 Nov, 21:32, "Ashot Geodakov" <a_geoda...@nospam.hotmail.com>
wrote:
Google "adding context menu to windows explorer"

"Karl" <googlegro...@cortexa.co.ukwrote in message

news:11**********************@d55g2000hsg.googlegr oups.com...
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
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.

Nov 10 '07 #4
On 10 Nov, 12:18, Karl <googlegro...@cortexa.co.ukwrote:
On 7 Nov, 21:32, "Ashot Geodakov" <a_geoda...@nospam.hotmail.com>
wrote:
Google "adding context menu to windows explorer"
"Karl" <googlegro...@cortexa.co.ukwrote in message
news:11**********************@d55g2000hsg.googlegr oups.com...
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

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.
Nov 22 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mohit Gupta | last post: by
reply views Thread by Roman Muntyanu | last post: by
5 posts views Thread by yxq | last post: by
5 posts views Thread by lgbjr | last post: by
2 posts views Thread by Doug Bell | last post: by
2 posts views Thread by gilad | last post: by
2 posts views Thread by jamil | last post: by
reply views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.