RE: [PHP3] Copying a directory From: Opec Kemp (okemp <email protected>)
Date: 11/30/99

>
> Michael,
> Thanks for your response. I have tried the following:
>
> copy('/path/to/existing/dir','/path/to/new/dir');
> This give me a file with the name of the new directory, not a directory
>
> mkdir('/path/to/new/dir');
> copy('/path/to/existing/dir/*','/path/to/new/dir');
> This gives me "cannot open /path/to/existing/dir/* for reading
> (permissions
> aren't the issue). Even if it did copy, I don't think it would be
> recursive.

Why don't you try

system("/bin/cp -R /path/to/existing/dir /path/to/new/dir");

This copy shoulde be recursive.

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>