Re: Parsing and organizing files in folder with PHP question
| From: | Matthew Zand | Date: | Wed, 17 Jul 2019 20:55:23 +0000 |
| Subject: | Re: Parsing and organizing files in folder with PHP question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-326854@lists.php.net to get a copy of this message | ||
Awesome, thanks Tedd. You are life saver. Matt
On Wed, Jul 17, 2019 at 4:51 PM Tedd Sperling <tedd@sperling.com> wrote:
>
> > On Jul 17, 2019, at 2:19 PM, Matthew Zand <dcwebmakers@gmail.com> wrote:
> >
> > I have a content folder on my website with more than few thousand images
> and videos. I want to write php code to do following:
> >
> > 1- Read all files on the folder
> >
> > 2- Remove all files that are older than 2 years ago
> >
> > 3- Loop through all content files to check file type and save them in
> two arrays (one for images and another for videos)
> >
> > 4- Merge new image array files with an existing image folder files but
> if duplicate exists, override the older version of file.
> >
> >
> > What is best way to achieve this?
>
> Best way? I dunno, but here’s where I would start:
>
> http://citw.lcc.edu/~sperlt/citw185/examples/file-info.php
>
> I think all the code you need is there. If anyone sees anything wrong with
> the way I’m doing this, please let me know.
>
> Cheers,
>
> Tedd
> _______________
> tedd sperling
> tedd@sperling.com
>
>
>
>
>
>
--
Best,
DC Web Makers <https://blockchain.dcwebmakers.com/>
Coding Bootcamps <https://coding-bootcamps.com/>
240-200-6131
301-327-8773