sabecs
asked on
PHP - delete similar named files from folder
Hi,
If I have the following files in my http://www.mywebsite.com/uploads/ folder ,
What PHP command should I use to delete all files starting with the "item760_" ?
Thanks in advance for your feedback.
item757_1.jpg
item757_1_med.jpg
item757_1_sml.jpg
item757_1_swg.jpg
item757_1_tny.jpg
item760_1.jpg
item760_1_med.jpg
item760_1_sml.jpg
item760_1_swg.jpg
item760_1_tny.jpg
item762_1.jpg
item762_1_med.jpg
item762_1_sml.jpg
item762_1_swg.jpg
item762_1_tny.jpg
item764_1.jpg
item764_1_med.jpg
item764_1_sml.jpg
item764_1_swg.jpg
item764_1_tny.jpg
item766_1.jpg
If I have the following files in my http://www.mywebsite.com/uploads/ folder ,
What PHP command should I use to delete all files starting with the "item760_" ?
Thanks in advance for your feedback.
item757_1.jpg
item757_1_med.jpg
item757_1_sml.jpg
item757_1_swg.jpg
item757_1_tny.jpg
item760_1.jpg
item760_1_med.jpg
item760_1_sml.jpg
item760_1_swg.jpg
item760_1_tny.jpg
item762_1.jpg
item762_1_med.jpg
item762_1_sml.jpg
item762_1_swg.jpg
item762_1_tny.jpg
item764_1.jpg
item764_1_med.jpg
item764_1_sml.jpg
item764_1_swg.jpg
item764_1_tny.jpg
item766_1.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER