Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to loop through a directory and hyperlink to all files

Reply
Thread Tools

how to loop through a directory and hyperlink to all files

 
 
mrmagoo
Guest
Posts: n/a
 
      06-09-2006
I want to loop through a directory and list all files in hyperlinks. Then
when you click on a hyperlink, it opens the file in whatever application it
needs. For now I need to do this with Adobe Acrobat, but I'd like to know
how to do this for Excel, etc.

Can anyone show me some code? I've looked on google and found only
fragments, surprisingly.


 
Reply With Quote
 
 
 
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      06-09-2006
You can easily recurse a directory and its subdirectories, dispalying the
file paths etc. Wrapping them in hyperlinks is only a case of surrounding
the results with the relevent text for a hyperlink.

This will help you get started.
http://support.microsoft.com/default...b;en-us;303974

--
Regards

John Timney (MVP)


"mrmagoo" <-> wrote in message
news:uSPTO%23$...
>I want to loop through a directory and list all files in hyperlinks. Then
> when you click on a hyperlink, it opens the file in whatever application
> it
> needs. For now I need to do this with Adobe Acrobat, but I'd like to know
> how to do this for Excel, etc.
>
> Can anyone show me some code? I've looked on google and found only
> fragments, surprisingly.
>
>



 
Reply With Quote
 
 
 
 
Ray Booysen
Guest
Posts: n/a
 
      06-09-2006
mrmagoo wrote:
> I want to loop through a directory and list all files in hyperlinks. Then
> when you click on a hyperlink, it opens the file in whatever application it
> needs. For now I need to do this with Adobe Acrobat, but I'd like to know
> how to do this for Excel, etc.
>
> Can anyone show me some code? I've looked on google and found only
> fragments, surprisingly.
>
>

I actually wrote a usercontrol which binds the contents of a directory
to a datagrid (ASP.NET 1.1) and displays the files and folders with
clickable links. Its late for me now, but I'll try to post some code
tomorrow.

Email me to remind me.
 
Reply With Quote
 
mrmagoo
Guest
Posts: n/a
 
      06-09-2006
Ooh, I'd love to see that.


"Ray Booysen" <> wrote in message
news:%...
> mrmagoo wrote:
> > I want to loop through a directory and list all files in hyperlinks.

Then
> > when you click on a hyperlink, it opens the file in whatever application

it
> > needs. For now I need to do this with Adobe Acrobat, but I'd like to

know
> > how to do this for Excel, etc.
> >
> > Can anyone show me some code? I've looked on google and found only
> > fragments, surprisingly.
> >
> >

> I actually wrote a usercontrol which binds the contents of a directory
> to a datagrid (ASP.NET 1.1) and displays the files and folders with
> clickable links. Its late for me now, but I'll try to post some code
> tomorrow.
>
> Email me to remind me.



 
Reply With Quote
 
mrmagoo
Guest
Posts: n/a
 
      06-09-2006
Great! thanks a log.
"John Timney (MVP)" <> wrote in message
news:iaednVZtIeH-...
> You can easily recurse a directory and its subdirectories, dispalying the
> file paths etc. Wrapping them in hyperlinks is only a case of surrounding
> the results with the relevent text for a hyperlink.
>
> This will help you get started.
> http://support.microsoft.com/default...b;en-us;303974
>
> --
> Regards
>
> John Timney (MVP)
>
>
> "mrmagoo" <-> wrote in message
> news:uSPTO%23$...
> >I want to loop through a directory and list all files in hyperlinks. Then
> > when you click on a hyperlink, it opens the file in whatever application
> > it
> > needs. For now I need to do this with Adobe Acrobat, but I'd like to

know
> > how to do this for Excel, etc.
> >
> > Can anyone show me some code? I've looked on google and found only
> > fragments, surprisingly.
> >
> >

>
>



 
Reply With Quote
 
scorp scorp is offline
Junior Member
Join Date: Jan 2009
Posts: 1
 
      01-09-2009
I'm looking for something very similar.. Can you email the user control to me as well?

Thanks so much in advance!!
 
Reply With Quote
 
Revathishre Revathishre is offline
Junior Member
Join Date: May 2011
Posts: 1
 
      05-06-2011
I am too looking for the same.Can u mail me the code??
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Triple nested loop python (While loop insde of for loop inside ofwhile loop) Isaac Won Python 9 03-04-2013 10:08 AM
Loop through files in a directory Ben Johnson Ruby 2 05-04-2007 09:50 PM
How would I loop through all the files in a subdirectory? Angus Comber C Programming 1 01-22-2004 11:43 PM
How do we use the file system object to loop through a directory and refresh all the files? Ajay Garg ASP General 5 01-14-2004 08:54 PM



Advertisments