Dump Directory content to PHP directory

I have a directory like this:

/images/

      

and then I have another directory like this

/waiting/pack1/

      

but I have a bunch of packages, so I was wondering how I can make a script to dump all the contents of those directories /pack*

into /images/

.

+2


a source to share


1 answer


Use the directory of the recursive iterator to get all the filenames. Loop on the result (filenames) and move them inside the loop to the desired directory.
You can also try glob



+2


a source







All Articles