Forum Moderators: open

Message Too Old, No Replies

Browse to Local Directory?

         

txbakers

3:23 am on Apr 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The <input type="file"> will allow a user to browser their local drives to find a file.

Is there a similar way to do this just to get a directory?

I wrote a routine to backup data to a person's drive, but I can only hardcode the path right now. I'd like to make it dynamic, but without the user having to type in the path.

Purple Martin

6:29 am on Apr 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd guess that you'd need something like a Java applet or an ActiveX object for that.

R1chard

4:33 pm on Apr 21, 2004 (gmt 0)

10+ Year Member



It's a bit messy, but you could make them pick a file (any file in the target directory), and then use JavaScript or whatever to strip off everything after the final / in the string.

txbakers

5:15 pm on Apr 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I did think about that one, but it would be messy, and very hard to explain - and what if they create a new folder without any file in it? Then they'd have to put a file in it to prime it.

I was thinking of writing something pretty complex using the FileScriptingObject and getFolders, but UGH!