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!

Is there a way to "batch" add a script to a folder of files?

Status
Not open for further replies.
Jul 13, 2001
180
US
I have a folder of html pages that I want to place level password permissions on. The script checks that unless they have gone through the login page, they are denied access to any of those pages.

I have over 100 pages and it would be a pain to add the script to each one individually.

.htaccess is NOT an alternative. My ISP is on Win 2K servers without Apache.

Is there also a way to "batch change" a folder of html files to asp?

Thanks very much for any help.
 
As far as changing them to .asp pages, that's easy. From a command prompt, just change to the directory they are all stored in and execute "rename *.htm *.asp". The easiest thing to do what you want is to create a page that just contains the script to do what you want and include it at the top of each of those HTML pages.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top