Please login or register.

Login with username, password and session length
Advanced search  

News:

(2009-05-04) The Rules and Terms of Service have been updated. Please make sure you read, understand, and follow them.

Author Topic: Copying a directory  (Read 216 times)

Active users: zampu (2), BlueSkyIS (1)
0 Members and 1 Guest are viewing this topic.

zampu

  • Irregular
  • Offline Offline
  • Posts: 30
    • View Profile
Copying a directory
« on: September 14, 2007, 06: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!
Logged

BlueSkyIS

  • Addict
  • Offline Offline
  • Posts: 2,431
    • View Profile
    • WWW
Re: Copying a directory
« Reply #1 on: September 14, 2007, 06: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.
Logged
“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

zampu

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

PHP Freaks Forums

 
 
 

Page created in 0.039 seconds with 19 queries.