[tpm] Deleting files older than a certain date

Liam R E Quin liam at holoweb.net
Thu May 5 08:43:47 PDT 2011


On Wed, 2011-05-04 at 21:26 -0700, Omid Gulban wrote:

[resending from the right mail account!]

> 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

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org



More information about the toronto-pm mailing list