How to get the network path using OpenFileDialog?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • VhD50

    How to get the network path using OpenFileDialog?

    Hi,
    I'm using the OpenFileDialog to let the user pick a file, then I need to get
    the file name and file path of the picked file and store it in a database.
    My problem comes in when the user picks files from a network folder. Instead
    of getting the real file path, i.e. \\servername\sh aredfolder, what I get is
    the drive letter of the mapped drive. So, instead of having the true path
    like '\\servername\s haredfolder\fil ename.txt', now I get something like
    'M:\filename.tx t'.
    Is there any way I can get the real file path? If possible, please give me
    some sample code.
    Thanks in advance for your help.


  • Kerry Moorman

    #2
    RE: How to get the network path using OpenFileDialog?

    VhD50,

    A couple of places to start with:





    Kerry Moorman


    "VhD50" wrote:
    [color=blue]
    > Hi,
    > I'm using the OpenFileDialog to let the user pick a file, then I need to get
    > the file name and file path of the picked file and store it in a database.
    > My problem comes in when the user picks files from a network folder. Instead
    > of getting the real file path, i.e. \\servername\sh aredfolder, what I get is
    > the drive letter of the mapped drive. So, instead of having the true path
    > like '\\servername\s haredfolder\fil ename.txt', now I get something like
    > 'M:\filename.tx t'.
    > Is there any way I can get the real file path? If possible, please give me
    > some sample code.
    > Thanks in advance for your help.
    >
    >
    >[/color]

    Comment

    • Sergey Novogilov

      #3
      Re: How to get the network path using OpenFileDialog?

      Hi,

      Our product, Dialog Workshop .NET contains special customized Open/Save
      dialogs
      which allow to extend the functionality of standard .NET Open/Save dialogs.
      Our dialogs allow to get full remote folder path like this:

      ftp://username@yoursite.com/yourfolder

      Please visit http://www.componentage.com for details.
      Also please Dialog Workshop .NET user's manual, "Working with remote
      folders" topic.

      With Best Regards,
      Sergey

      "VhD50" <vhd_50@hotmail .com> wrote in message
      news:u7Z3SHTpFH A.2952@TK2MSFTN GP15.phx.gbl...[color=blue]
      > Hi,
      > I'm using the OpenFileDialog to let the user pick a file, then I need to
      > get the file name and file path of the picked file and store it in a
      > database.
      > My problem comes in when the user picks files from a network folder.
      > Instead of getting the real file path, i.e. \\servername\sh aredfolder,
      > what I get is the drive letter of the mapped drive. So, instead of having
      > the true path like '\\servername\s haredfolder\fil ename.txt', now I get
      > something like 'M:\filename.tx t'.
      > Is there any way I can get the real file path? If possible, please give me
      > some sample code.
      > Thanks in advance for your help.
      >[/color]


      Comment

      Working...