Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to select the File (help me)

How to select the File (help me)

Scheduled Pinned Locked Moved C#
csharphelptutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    madhugurukul
    wrote on last edited by
    #1

    I want to select the file and i want to get the path of the file like(browsefile dialog,savefiledialog,openfiledialog)i can`t use the above dialogs because i just want to select the file and getting path. (ex:openfiledialog ->browser window we have option "open"->i don`t need this option i want like "select" option (and i want to select the file not the folder) how can i do this in c#.. help me:doh: madhu

    C 1 Reply Last reply
    0
    • M madhugurukul

      I want to select the file and i want to get the path of the file like(browsefile dialog,savefiledialog,openfiledialog)i can`t use the above dialogs because i just want to select the file and getting path. (ex:openfiledialog ->browser window we have option "open"->i don`t need this option i want like "select" option (and i want to select the file not the folder) how can i do this in c#.. help me:doh: madhu

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      madhugurukul wrote:

      can`t use the above dialogs because i just want to select the file and getting path.

      Say what ? Why can't you use those ? They do exactly what you want, select the file and tell you the path. Just use the SelectedFile property, or whatever it is. Just because there's an open method, doesn't mean you need to use it ( I never have )

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      M 1 Reply Last reply
      0
      • C Christian Graus

        madhugurukul wrote:

        can`t use the above dialogs because i just want to select the file and getting path.

        Say what ? Why can't you use those ? They do exactly what you want, select the file and tell you the path. Just use the SelectedFile property, or whatever it is. Just because there's an open method, doesn't mean you need to use it ( I never have )

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        M Offline
        M Offline
        madhugurukul
        wrote on last edited by
        #3

        i cant use those property because in that dialog (ie openfile or savefile..) when it show it is going to have the option like "open" or "save" but i dont want to open the file or save the file ok i just want to select the file suppose if i use openfiledialog then user will clik "open" option user will feel that the file is opened but i dont want to open the file i just asking is there any info about fileselect dialog -- modified at 4:27 Thursday 15th November, 2007

        C C 2 Replies Last reply
        0
        • M madhugurukul

          i cant use those property because in that dialog (ie openfile or savefile..) when it show it is going to have the option like "open" or "save" but i dont want to open the file or save the file ok i just want to select the file suppose if i use openfiledialog then user will clik "open" option user will feel that the file is opened but i dont want to open the file i just asking is there any info about fileselect dialog -- modified at 4:27 Thursday 15th November, 2007

          C Offline
          C Offline
          Cape Town Developer
          wrote on last edited by
          #4

          FileInfo o = new FileInfo("c:\\file.dat"); // o.Name // o.FullName // o.Extension // o.Extension // o.DirectoryName Does this help ??

          Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.

          1 Reply Last reply
          0
          • M madhugurukul

            i cant use those property because in that dialog (ie openfile or savefile..) when it show it is going to have the option like "open" or "save" but i dont want to open the file or save the file ok i just want to select the file suppose if i use openfiledialog then user will clik "open" option user will feel that the file is opened but i dont want to open the file i just asking is there any info about fileselect dialog -- modified at 4:27 Thursday 15th November, 2007

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            This is bizarre. How will your file dialog differ ?

            Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups