473,395 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to loop through a directory and hyperlink to all files

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.
Jun 9 '06 #1
4 2297
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:uS****************@TK2MSFTNGP02.phx.gbl...
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.

Jun 9 '06 #2
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. ;)
Jun 9 '06 #3
Ooh, I'd love to see that.
"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
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. ;)

Jun 9 '06 #4
Great! thanks a log.
"John Timney (MVP)" <x_****@timney.eclipse.co.uk> wrote in message
news:ia********************@eclipse.net.uk...
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:uS****************@TK2MSFTNGP02.phx.gbl...
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.


Jun 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dSchwartz | last post by:
What I think I'm looking for is a way (in XSL stylesheet) to get the contents of a directory. How can this be accomplished? more detailed: /root index.aspx xsl_style.xsl /xml...
0
by: eric_caron_31 | last post by:
Hi I have a page with a Datalist. In section ItemTemplate, I have an hyperlink. I want to Bind content of a directory to imageurl. I want to do this to display all picture files from a...
2
by: carla | last post by:
We have a bunch of articles that visitors to our website can read. They do a search, and we present a list of matching article links. The files are named sequentially: art1.htm, art2.htm, art3,...
12
by: Paul | last post by:
Hi just wondering a good way to display all files in a directory on a server and have them selectable to be opened by the client machine. These files change from time to time so would not want to...
1
by: farseer | last post by:
Hi, I am storing certain files in the same directory as an asp page. I'd like for that page to be able to read read the names of the files in that directory with a certain extension and create a...
1
by: 2stepme | last post by:
I know I should be using a database ... but ... I have created a few pages which store user data in text files. The user text files where created using session_encode. There is a text file for...
6
by: tcurdts | last post by:
Greetings, I'm using WindowsXP Pro v5.1and am writing a BAT file to loop through a list of files (contained in a .txt file) and pass them (actually variables derived from them) to another program...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
2
by: Ben | last post by:
Hi, there are a lot of files (unknown number), all ending with .aspx, in directory c:\inetpub\wwwroot\mydirectory\ How can i make a hyperlink for each of those files and make that list of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.