[tpm] Deleting files older than a certain date
Liam R E Quin
liam at w3.org
Wed May 4 21:36:35 PDT 2011
On Wed, 2011-05-04 at 21:26 -0700, Omid Gulban wrote:
> The objective is to delete files in each of /projects/people older
> than a certain date and delete all Empty folders as well. But I cannot
> delete the FILES folder within each '/projects/people' even when it
> becomes empty.(I can remove older files in it).
What system error do you get when you try? e.g. print out $@
Likely problems are -
* permission denied, if you don't have write permission
for /projects/people to remove an entry from it - to remove a directory
you need write access to the parent directory on many operating systems,
probably including our iPhone.
* FILES directory isn't really empty, e.g. there's a "hidden" file whose
name starts with a "." or there's a subdirectory
* there's a bug in your program :)
Note that you need to use rmdir to remove a directory.
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
More information about the toronto-pm