Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many pages does my site has?

Status
Not open for further replies.

sbayter

IS-IT--Management
Nov 14, 2002
95
CO
Hi,
I have a website which is pretty big and composed of many folders. I use dreamweaver and the site is hosted in a *nix server.
Is there any way to know how many html pages are there in the site?
Thanks,


sbayter
 
Count all the pages that have .htm or .html as an extension?

There's always a better way...
 
I really don't want to count them manually.
I think I have more than 1000 pages.
Any other way?
Thanks,

sbayter
 
Copy the contents of your server to a local machine. Do a find for all files named "*.html" or "*.htm". It will eventually give you a results count, or you can select 'em and do a "Properties...".

Alternately, count all the files in the HTML directory, but subtract the count of non-html files (which will probably be fewer than HTML files).

You're helped by knowing that, for example, it's uinlikely that there will be any html files in CGI-BIN directories, or a directory called IMAGES, DOWNLOADS, etc.

It also makes sense to, when looking at your directory of files, to sort the view order by type, then simply select all the HTM/HTML pages and do a Properties. If your files are scattered like rabbit droppings across multiple files, then you'll probably spend less time stickin' 'em all in one "DeleteMe" folder than you spent reading this e-mail.

Cheers,


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
if you could go on the *nix machine itself with SSH or telnet you could do this command from the folder where your site is :

ls -lR . *.htm* | wc -l

it would give you a number of all .html and .htm files.

more info can be read right here :


Gary Haran
==========================
 
Gary,

Good tip! I don't know how it is in your neck of the woods but most of the hosting companies in the US don't allow telnet or a shell session. I understand their concerns but I'd gladly pay a little extra to have the capability!



There's always a better way...
 
some FTP programs allow you to run some server side commands. If that doesn't work you can download the entire site in a folder on your HDD. Then you can do a search for *.htm* files in that folder. If you are under explorer it will tell you how many htm* files there are.

Gary Haran
==========================
 
Why not do a search for *.htm? in the DW local cache?


Chris.



Indifference will be the downfall of mankind, but who cares?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top