delete files from folder

General discussions related to php

Moderators: macek, egami, gesf

sudhir
New php-forum User
New php-forum User
Posts: 1
Joined: Thu Sep 13, 2012 4:15 am

delete files from folder

Postby sudhir » Thu Sep 13, 2012 4:21 am

hello everyone

how can remove files from folder where files size is less then 100 bytes. using php script
:help:

NigelRen
php-forum Active User
php-forum Active User
Posts: 450
Joined: Fri Aug 05, 2011 9:53 am

Re: delete files from folder

Postby NigelRen » Sat Sep 15, 2012 11:59 pm

If you start with readdir ( http://php.net/manual/en/function.readdir.php ) which will list the files then you should be able to get a list of files, then you need to check the size of each file - have a go and see how far you get.


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest