RE: [PHP3] Copying a directory From: Joe Robuck (joer <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.

Any suggestions?

Thanks in advance for your help.

- Joe

-----Original Message-----
From: Michael S. Steuer [mailto:michael <email protected>]
Sent: Tuesday, November 30, 1999 5:30 PM
To: Joe Robuck
Subject: RE: [PHP3] Copying a directory

|-----Original Message-----
|From: Joe Robuck [mailto:joer <email protected>]
|Sent: Wednesday, 01 December 1999 2:29
|To: 'php3 <email protected>'
|Subject: [PHP3] Copying a directory
|
|
|I'm trying to copy a directory recursively, meaning all of the
|subdirectories and all of the files within those subdirectories.
|Copying the
|directory using copy() doesn't work and creating the directory
|using mkdir()
|then using copy to copy all of the files (*) doesn't work either. Does
|anyone have any suggestions?

What do you mean with doesn't work ? Be more specific, at what point do you
get stuck?

regards,

Michael.

|Thanks,
|
|Joe
|
|
|--
|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>
|

-- 
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>