if you're renaming to .PHP, i assume that you'll
be using PHP.  use PHP to solve your problem:

This was taken directly from the PHP.net site:

if ($dir = @opendir("/tmp")) {
  while($file = readdir($dir)) {
    echo "$file\n";
  }  
  closedir($dir);
}

as others have said before, "read the documentation".
it really does help. 



> -----Original Message-----
> From: Mark Maggelet [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 08, 2001 2:34 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] conversion script
> 
> 
> On Tue, 8 May 2001 11:09:18 -0700, Ryan Christensen ([EMAIL PROTECTED]) 
> wrote:
> >Would anyone be able to help me out with this:
> >
> >I have quite a few (almost 2000) .html files that I would like to 
> >change
> >over to the .php extension.  Past that, I would also like to add 
> >text to the
> >top & bottom of each page (for template purposes.)  Does anyone know
> >of a
> >script that would automate this process, going through all the 
> >documents in
> >a directory, and making the needed changes?
> >
> >Thanks in advance..
> 
> for the first part you can try (not tested):
> 
> for i in `/bin/ls *html |sed 's/.html//g'`; do mv $i.html $i.php; 
> done
> 
> for the second part you might want to try putting it in your 
> auto_prepend_file.
> 
> - Mark
> 
> >----------------------------
> >Ryan Christensen
> >OlyPen Technical Support
> >[EMAIL PROTECTED]
> >360.457.3000
> >800.303.8696
> >
> >
> >
> >-- 
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: php-list-
> >[EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to