Please login or register.

Login with username, password and session length
Advanced search  

News:

We are constantly trying to improve phpfreaks and these forums, so feel free to go to the PHPFreaks Comments/Suggestions board and point out anything you'd like to see different!

Maintenance Notice

PHPFreaks has successfully moved to a new Dedicated Server, hosted by Server Powered. Please help support future upgrades by Donating.

Author Topic: Copying a directory  (Read 155 times)

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
Pages: [1]
 

Page created in 0.031 seconds with 18 queries.