RE: [PHP-DB] counting all the files in a directory
| From: | Ozemail ) | Date: | Fri, 27 Oct 2000 03:12:41 +0000 |
| Subject: | RE: [PHP-DB] counting all the files in a directory | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3983@lists.php.net to get a copy of this message | ||
Hi,
Or you can simply execute the copy comannd in shell like
exec("cp $oldpath/* $newpath/");
This will copy all files in the $oldpath to the $newpath. You can only copy the files from path if
you have
the permission. The user id will depends on how you're running the PHP, ie as Apache module or
as CGI.
Of Course you can use the PHP to loop through as well but IMHO the method above is easier :).
PS. There may be some security issue with this method so use it with caution.
> -----Original Message-----
> From: sarahana [mailto:sarahana@scournepal.com]
> Sent: Friday, October 27, 2000 1:11 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] counting all the files in a directory
>
>
> I want to have a script that can copy all the files of a specifiend
> directory to another specified directory. How do I loop the script so that
> all files are copied?
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>