Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

File select, folder only

Posted on 2004-08-10
5
Medium Priority
?
532 Views
Last Modified: 2010-05-18
Hi,
I want to select a folder through asp, just like the file select box but you have to pick a file with that, I just want to pick a loctaion, ie "C:\" or "\\Server\foldername\"
0
Comment
Question by:wmpc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 11

Expert Comment

by:Slimshaneey
ID: 11760758
You cannot use the file select item to select folders. Your only bet would be to write a script the lists all the folders in a given directory, and have links for each folder that mark that folder as the target ni your DB or script or whatever...
0
 

Author Comment

by:wmpc
ID: 11760841
any pointers to how?
0
 
LVL 11

Accepted Solution

by:
Slimshaneey earned 2000 total points
ID: 11761080
To start off you can use this script from w3 to list all subfolders inside a folder

<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test\")

for each x in fo.SubFolders
  'Print the name of all subfolders in the test folder
  Response.write(x.Name & "<br />")
next

set fo=nothing
set fs=nothing
%>

From here... You need to modify the "  Response.write(x.Name & "<br />")" line to produce a link, that executes a script to select that folder.
ie
Response.write("<a href=""selectfolder.asp?folder=" & server.urlencode("c:\test\" &  x.Name) & """ >" & x.Name  & "</a><br />")

On that script then it takes the folder name and adds it to you DB or whatever you need that folder name for...
None of this is tested. Just pointers in the right direction!!!
Hope it helps
0
 
LVL 6

Expert Comment

by:masirof
ID: 12728049
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: Slimshaneey

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

masirof
EE Cleanup Volunteer
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question