473,569 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto generate a directory listing?

Hi -
I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this. So, when someone comes to this directory and thus opens
index.htm, I want that file to show a listing of all files in the
directory with hyperlinks to them.

Thanks for the help,
Doug

Nov 3 '06 #1
8 6939
do********@gmai l.com said the following on 11/3/2006 1:59 PM:
Hi -
I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this. So, when someone comes to this directory and thus opens
index.htm, I want that file to show a listing of all files in the
directory with hyperlinks to them.
JS can't do it easily if at all. The best you could do would be to
manually create that index.htm file once a week or so.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 3 '06 #2

do********@gmai l.com wrote:
Hi -
I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this. So, when someone comes to this directory and thus opens
index.htm, I want that file to show a listing of all files in the
directory with hyperlinks to them.

Thanks for the help,
Doug
This requires a server-side scripting language like PHP. PM or post in
the PHP forum and I'll give you the code.

Nov 4 '06 #3
pangea33 said the following on 11/4/2006 2:28 AM:
do********@gmai l.com wrote:
>Hi -
I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this. So, when someone comes to this directory and thus opens
index.htm, I want that file to show a listing of all files in the
directory with hyperlinks to them.

Thanks for the help,
Doug

This requires a server-side scripting language like PHP.
No it doesn't. Client-side JS can do it but server side code is needed
to save the file.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 4 '06 #4
Randy Webb wrote on 04 nov 2006 in comp.lang.javas cript:
pangea33 said the following on 11/4/2006 2:28 AM:
>do********@gmai l.com wrote:
>>Hi -
I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this. So, when someone comes to this directory and thus opens
index.htm, I want that file to show a listing of all files in the
directory with hyperlinks to them.

Thanks for the help,
Doug

This requires a server-side scripting language like PHP.

I doubt that, anonymus, as "index.htm" indicates a windows server, and an
ASP [or asp.net] code is the logical serverside implementation, which can
easily be implemented in serverside j[ava]script, but generally not in PHP.

No it doesn't. Client-side JS can do it but server side code is needed
to save the file.
I doubt that, Randy.

If index.htm is opened, the directory list is not reachable from
clientside. Serverside code will do nicely, however.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 4 '06 #5
In message <11************ *********@m73g2 000cwd.googlegr oups.com>, Fri,
3 Nov 2006 10:59:15, "do********@gma il.com" <do********@gma il.com>
writes
>I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this. So, when someone comes to this directory and thus opens
index.htm, I want that file to show a listing of all files in the
directory with hyperlinks to them.
If you can manage with incomplete automation - the tool you use, as
author, to manage that directory ought to be able to give you a list of
the file names in it. For example, WS_FTP has a DirInfo button which
shows the files in Notepad. You can save that file, and you can
copy'n'paste its contents.

You can then write a HTML/JS page, to be run locally by you, with a
TextArea into which you paste the raw list. A button can then invoke
javascript code to transform the list to be either the core or the
entirety of the desired index.htm, which you can copy out and upload to
your site. My <URL:http://www.merlyn.demo n.co.uk/js-quick.htmhas an
Indt button which alters the TextArea.

With other programming tools, you can make it more automatic along the
same lines; for example, a Windows batch file might FTP the directory
and invoke WSH CSCRIPT javascript/vbscript to do the transform before
uploading.

That was written for Windows; it should be possible to do similarly on
other systems.

It's a good idea to read the newsgroup and its FAQ. See below.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.c om/faq/>? JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Nov 4 '06 #6
ASM
Randy Webb a écrit :
pangea33 said the following on 11/4/2006 2:28 AM:
>do********@gmai l.com wrote:
>>I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this.

This requires a server-side scripting language like PHP.

No it doesn't. Client-side JS can do it but server side code is needed
to save the file.
How client-side JS can do this (list of links) ?

How Is it possible to if :
my FAI has made something you can't list a folder on server --404
(say I'm in same case as pangea33)
--
ASM
Nov 4 '06 #7
ASM
Dr J R Stockton a écrit :
In message <11************ *********@m73g2 000cwd.googlegr oups.com>, Fri,
3 Nov 2006 10:59:15, "do********@gma il.com" <do********@gma il.comwrites
>I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this. So, when someone comes to this directory and thus opens
index.htm, I want that file to show a listing of all files in the
directory with hyperlinks to them.

If you can manage with incomplete automation - the tool you use, as
author, to manage that directory ought to be able to give you a list of
the file names in it.
Fetch shows me the list of files of what folder (of course !)
but I'vent found a menu to output this list.
For example, WS_FTP
What is WS_FTP ?
My <URL:http://www.merlyn.demo n.co.uk/js-quick.htmhas an
Indt button which alters the TextArea.
Would it be possible this page doesn't resize my browser's window?
:-(
C'est exaspérant !

Anyway, I understood anything what you want to show.
(I think you want to do too much things in an unique(alone) demo)
Nov 4 '06 #8
In message <45************ **********@news .orange.fr>, Sun, 5 Nov 2006
01:11:45, ASM <st************ *********@wanad oo.fr.invalidwr ites
>Dr J R Stockton a écrit :
> For example, WS_FTP

What is WS_FTP ?
It's a Windows FTP program. Once upon a time, IIRC, my ISP supplied a
version with its mail/news/browser package, but I've updated since. I
think WS_FTP_LE (Light Edition) which I use is free for non-commercial
use. <URL:http://www.merlyn.demo n.co.uk/pc-links.htmlinks to
ftp://garbo.uwasa.fi/windows/winsock/ which presumably has or had it;
but Google should find its home site (a lad I know found it 20 days
ago). It may require Win95+; I've used it in 98 & XP.

>My <URL:http://www.merlyn.demo n.co.uk/js-quick.htmhas an Indt
button which alters the TextArea.

Would it be possible this page doesn't resize my browser's window?
:-(
C'est exaspérant !
Not possible; the page is primarily for my own benefit on my PCs, and
copied to the Web on general grounds.

But remember that it says "Please do not use this actual Web page
repeatedly. If you like it, or parts of it, make your own private page
on your private local system, including only what is essential."

In your copy, you can remove or alter the two statements containing
window.resizeTo !!

BTW, I resize my local home page, By visiting it, I can be sure of
having the size of browser window that I prefer to design with (not
for); and it has links to resize itself to other common sizes.
--
J R Stockton
Nov 5 '06 #9

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

Similar topics

9
2715
by: scott | last post by:
I have a combo in LISTING 2 that I'm trying to force a sumbit when a user makes a change. Can anyone see why it doesn't fire LISTING 2 code? It just doesn't do anything. What I'm really trying to do is access the value of the combo after a user makes a change. I'm just hardcoding the teamID querystring in this example. LISTING 1...
19
3298
by: SU News Server | last post by:
I've struggled with this for quite a while and I'm am just not sure what is going on. I have the following code import os def buildList( directory='/Users/mkonrad' ) dirs = listing = os.listdir(directory)
2
3366
by: Tom | last post by:
I need to get a directory listing through http. If I put the directory path in the browser address bar such as http://somewebpage.com/subdir I get the listing of the directory. Of course this is returned to my client in html. To get the directory listing from this I would need to do some intersting parsing. ftp is not enabled and so I can't do...
8
11057
by: gil | last post by:
Is it possible to prevent a browser from listing the entire contents of a folder? The site, is hosted on my ISP with the following layout- site/ "user name from ISP" pagefile (dir) index.html site/pagefile/
2
1696
by: ngr | last post by:
I used to use the DirListox control in VB6 but this is no longer supported in VB.NET. What I want to do: I want to take a directory listing and show any subdirectories in a list. When you click on a directory in the list another list appears with the directory listing of files and directories within it. Can anyone please advise how to...
5
1883
by: vikram | last post by:
I am developing a display web site which displays several listing and details, data is picked up from database for the lists. There is no search criteria but only pagination stuff. What i am thinkin gis to create a program which will read data and generate static html pages for the lists and dump the pages on the web server. when user will...
7
5476
by: epikto | last post by:
I have a mapped share that I am trying to get a listing of all the files that it contains. I use the following code to access the contents String files = Directory.GetFiles(path); I can then enumerate through that array to get my listing. However I am trying to set my application up as a service. And now (after calling methods in a...
4
3240
by: techusky | last post by:
I have a *very* simple script written that displays the directory listing of the current working directory, but I am having some difficulty when I try to change folders. Basically, I have my $dir variable set to this: --- $dir = getcwd() . "\\" . $nav; --- but for some reason the script does not actually display the contents of the directory...
1
5660
by: Steve | last post by:
My site is hosted on a Godaddy reseller site. Godaddy only allows the use of Curl to access remote sites. What is the method for listing a directory after connecting to the site with Curl? I've already tested my code for connecting but how do I list whats in the directory. The purpose is to compare the list to the filenames in my...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7665
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.