g46905
asked on
browsing to folder to select a file/folder and concatenating the string for a specified path in VB.NET
I am building an application in VB.NET which gives the user to select the path of the file/folder by browing through the drives.Currently, I am able to browse to the selected folder.After selecting the folder, this is being stored in a string and stored in a database table under PROJECT_DIRECTORY record.Below is the example..
database table
PROJECT_DIRECTORY
\projects\internet
\projects\intranet
\projects\devonline
\projects\testonline
When the user tried to browse to the desired location, it can be any drive (C : , D : , Z : ) and it can also start from the actual location ( for example internet ,intranet ) depending upon the way the use sets up his driver.
No matter how the user selects his location, I need to get the string starting from \projects and store that in the database.
Please let me know if you have any questions.Thanks for your help.
database table
PROJECT_DIRECTORY
\projects\internet
\projects\intranet
\projects\devonline
\projects\testonline
When the user tried to browse to the desired location, it can be any drive (C : , D : , Z : ) and it can also start from the actual location ( for example internet ,intranet ) depending upon the way the use sets up his driver.
No matter how the user selects his location, I need to get the string starting from \projects and store that in the database.
Please let me know if you have any questions.Thanks for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When the user sets up there default path starting with "\resource" as given in your example above. There is no way to determine at a later date minutes, hours, days later what the whole path is unless you save it some where. Two places come to mind, 1 The Registry 2 Isolated Storage.
ASKER
Is there a way to find the path of the network drive ( this can be address of the website, ftp connection or network location that this shortcut location will open)
The user has a network place ( this can be address of the website, ftp connection or network location that this shortcut location will open) and i want to check if the path contains "/projects" .Could you please tell me how I can acheive this?
Thanks,
The user has a network place ( this can be address of the website, ftp connection or network location that this shortcut location will open) and i want to check if the path contains "/projects" .Could you please tell me how I can acheive this?
Thanks,
Not that I know of, sorry.
ASKER
I have come across "Server.MapPath" but I am not sure if this reallt helps me.Do you knoe the purpose of this?
Thanks
Thanks
ASKER
As I mentioned, I am developing my application using VB.NET and want ot know if there is any similar fuctionality to Server.MapPath which is in ASP.NET
Please suggest
Please suggest
I do not program in ASP.Net and would not know of any functionality that would provide what you are looking for, sorry.
ASKER
For example :
Actual path of a particular folder is
\projects\internet\web\res
and the user setup his default path to be starting from "\resource"
I am unable to get the entire path ie "\projects\internet\web\re
It is taking it as "\resource\Project name" and this is not what I wanted.Could you help me how to get the actual path even if the user has his default path?
Please suggest