开发者

Dump Contents of Directories Into Directory PHP

开发者 https://www.devze.com 2022-12-27 08:46 出处:网络
I have a directory like this : /images/ and then I have another directory like this /waiting/pack1/ but I have a bunch of packs, so I was wo开发者_运维知识库ndering how I could make a script to

I have a directory like this :

/images/

and then I have another directory like this

/waiting/pack1/

but I have a bunch of packs, so I was wo开发者_运维知识库ndering how I could make a script to dump all the contents of these /pack* directories into the /images/ one.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号