write recursive function that uses PHP's functions for directory reading.

function read_rec($dir_name){
    open_the_dir_name
    while (read_from_the_dir){
        if (name_type=dir){
            read_rec($name);
        }else{ // the file is file not dir
            // make your check here
        }
    }
}
in pseudo code.

HTH

Andrey Hristov


----- Original Message ----- 
From: "andy" <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Sent: Friday, April 12, 2002 3:58 PM
Subject: Re: [PHP] is it possible to scann subdirectories?


> This looks for me like an unix command line. Does this work in php as well?
> 
> I did write the script for php, because I do not have a clue of shell
> script.
> 
> thanx, Andy
> ----- Original Message -----
> From: "Andrey Hristov" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: "andy" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, April 11, 2002 5:31 PM
> Subject: Re: [PHP] is it possible to scann subdirectories?
> 
> 
> > make recursive function for this.
> > or
> > use some external comment to find your files.
> > for example : find is a good choice
> > find -type f / -exec grep ohmygoodness {} \;
> >
> > will look in every file for "ohmygoodness"
> >
> > Andrey
> > ----- Original Message -----
> > From: "andy" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, April 11, 2002 6:28 PM
> > Subject: [PHP] is it possible to scann subdirectories?
> >
> >
> > > Hi there,
> > >
> > > I have to change several filenames in lots of subdirs.
> > >
> > > The script for changing filenames already works. How could I extend this
> to
> > > include all subdirs?
> > >
> > > thanx, Andy
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> 
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to