Author Topic: Copying a directory  (Read 342 times)

0 Members and 1 Guest are viewing this topic.

Offline zampuTopic starter

  • Irregular
    • View Profile
Copying a directory
« on: September 14, 2007, 07:24:35 PM »
I think i can use copy() to do this, but i just dk how :S.  i can only get it to copy files.

I need a script that can copy a folder, and all the files in that folder, and "paste" it in a new directory. 

Thanks for the help!

Offline BlueSkyIS

  • Addict
    • View Profile
    • Blue Sky iSolutions
Re: Copying a directory
« Reply #1 on: September 14, 2007, 07:35:41 PM »
first get the name of the directory, then mkdir() to make the directory elsewhere, then use copy() for each of the files into the new directory.
“Give a man a fish; you have fed him for today.  Teach a man to fish; and you have fed him for a lifetime” -Author unknown

Radar Detectors

Offline zampuTopic starter

  • Irregular
    • View Profile
Re: Copying a directory
« Reply #2 on: September 14, 2007, 07:36:31 PM »
the hard way xD, ok ty

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.