Author Topic: Copying a directory  (Read 470 times)

0 Members and 1 Guest are viewing this topic.

Offline zampuTopic starter

  • Irregular
  • Posts: 30
    • 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

  • Fanatic
  • Posts: 4,261
    • View Profile
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.
deprecated (adj.) Used typically in reference to a computer language to mean a command or statement in the language that is going to be made invalid or obsolete in future versions.

Head Shops and Grow Stores

Offline zampuTopic starter

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