0

I am migrating a legacy website to WordPress and I have some 6000 folders with files in them in two locations on the server that needs to be deleted.

/data/media/ /data/thumbnails/

All the folder names are in numbers (5635, 2742 etc.)

I have the list of these folder names.

Is it possible to create a PHP script that will go through these list of folder names and delete the files inside them? If the folders can also be deleted, perfect.

Thanks for your help.

0 Answers0