There is an app that will upload images to my webserver under sites/files/uploaded_images.

I am trying on Cron Run to:

  1. Scan this Directory.

  2. Check if the directory is not empty.

  3. Loop through all available images and for each image, get its filename.

  4. Delete that image.

Can anyone set me on the right track please ?

Thank you

New contributor
Ta La is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

closed as off-topic by leymannx, Clive Oct 9 at 6:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on programming, PHP, SQL, etc. that do not relate directly to Drupal are off-topic here, but can be asked on Stack Overflow." – leymannx, Clive
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.