How to get the directory (folder) on which user has done right click

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kulabhishek
    New Member
    • Dec 2008
    • 26

    How to get the directory (folder) on which user has done right click

    Hello,

    I have developed one application, and added it to right click pop-up menu of the folder.

    Whenever user right-clicks on folder and selects my application from pop-up menu, I want the path to that folder (on which user has done right click).

    I am using Directory.GetCu rrentDirectory( ), but it gives me path to the parent directory of the user right clicked directory.

    How can I get the path to the directory on which user has done right click?

    Regards
    Abhishek
  • kulabhishek
    New Member
    • Dec 2008
    • 26

    #2
    How to get the directory (folder) on which user has done right click

    Hello,

    I have developed one application, and added it to right click pop-up menu of the folder.

    Whenever user right-clicks on folder and selects my application from pop-up menu, I want the path to that folder (on which user has done right click).

    I am using Directory.GetCu rrentDirectory( ), but it gives me path to the parent directory of the user right clicked directory.

    How can I get the path to the directory on which user has done right click?

    Regards
    Abhishek

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      Could we see some of the code that you are using to do this? I'm going to bet there is some kind of EventArgument that is being passed that you could take advantage of.

      (PS. No need to post the same message twice, one minute apart.)

      Comment

      • kulabhishek
        New Member
        • Dec 2008
        • 26

        #4
        Hello tlhintoq,

        Thanks for reply.

        Actually I added my application to right click on folder by modifying registry and then i am just using Directory.GetCu rrentDirectory( ) inside constructor, which gives me parent directory of user right clicked directory. That's all I have done.

        (PS. I did not post the message two times, may be it accidentally got posted two times)

        Regards
        Abhishek

        Comment

        • tlhintoq
          Recognized Expert Specialist
          • Mar 2008
          • 3532

          #5
          I ran across this article/project where the author adds context menu to Windows Explorer in order to pass a folder name as the arguments to his .ZIP file utility. Sounds very much like what you are doing, with a different end application as the recipient of the command. It was built on top of this much simpler project that does not pass an argument but is an easier read to start with.

          Comment

          • kulabhishek
            New Member
            • Dec 2008
            • 26

            #6
            Thank you very much...

            I got what i needed.

            Thanks again

            Regards
            Abhishek

            Comment

            Working...