how to loop through a directory and hyperlink to all files

Discussion in 'ASP .Net' started by mrmagoo, Jun 9, 2006.

  1. mrmagoo

    mrmagoo Guest

    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.
     
    mrmagoo, Jun 9, 2006
    #1
    1. Advertising

  2. 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.aspx?scid=kb;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.
    >
    >
     
    John Timney \(MVP\), Jun 9, 2006
    #2
    1. Advertising

  3. mrmagoo

    Ray Booysen Guest

    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. ;)
     
    Ray Booysen, Jun 9, 2006
    #3
  4. mrmagoo

    mrmagoo Guest

    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. ;)
     
    mrmagoo, Jun 9, 2006
    #4
  5. mrmagoo

    mrmagoo Guest

    Great! thanks a log.
    "John Timney (MVP)" <> wrote in message
    news:...
    > 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.aspx?scid=kb;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.
    > >
    > >

    >
    >
     
    mrmagoo, Jun 10, 2006
    #5
  6. mrmagoo

    scorp

    Joined:
    Jan 9, 2009
    Messages:
    1
    I'm looking for something very similar.. Can you email the user control to me as well?

    Thanks so much in advance!!
     
    scorp, Jan 9, 2009
    #6
  7. mrmagoo

    Revathishre

    Joined:
    May 6, 2011
    Messages:
    1
    I am too looking for the same.Can u mail me the code??
     
    Revathishre, May 6, 2011
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TJS
    Replies:
    1
    Views:
    514
    Eliyahu Goldin
    Jun 23, 2004
  2. Angus Comber
    Replies:
    1
    Views:
    610
    Ben Pfaff
    Jan 22, 2004
  3. Ajay Garg
    Replies:
    5
    Views:
    210
  4. Ben Johnson

    Loop through files in a directory

    Ben Johnson, May 4, 2007, in forum: Ruby
    Replies:
    2
    Views:
    299
  5. Isaac Won
    Replies:
    9
    Views:
    387
    Ulrich Eckhardt
    Mar 4, 2013
Loading...

Share This Page