Re: [Tutor] Help listing directory timestamps and deleting directories

2011-01-24 Thread Karim
Hello, Also working w/o external module just the standard one: *>>> import datetime >>> remove_after = datetime.datetime.now() - datetime.timedelta(days=31) >>> remove_after datetime.datetime(2010, 12, 24, 23, 21, 10, 11315) * Regards Karim On 01/24/2011 08:02 PM, Vince Spicer wrote: On Mon

Re: [Tutor] Help listing directory timestamps and deleting directories

2011-01-24 Thread Japhy Bartlett
I would check that os.path.join(r,dir) is giving you the directory you think it is. - japhy On Mon, Jan 24, 2011 at 12:25 PM, bsd...@gmail.com wrote: > Hi, hoping for some help here. I've been trying to write a python script > (complete newb) and have spent several days trying to get this right

Re: [Tutor] Help listing directory timestamps and deleting directories

2011-01-24 Thread Vince Spicer
On Mon, Jan 24, 2011 at 11:25 AM, bsd...@gmail.com wrote: > Hi, hoping for some help here. I've been trying to write a python script > (complete newb) and have spent several days trying to get this right with no > success. > > I am trying to list timestamps in a directory and if they are older th

[Tutor] Help listing directory timestamps and deleting directories

2011-01-24 Thread bsd...@gmail.com
Hi, hoping for some help here. I've been trying to write a python script (complete newb) and have spent several days trying to get this right with no success. I am trying to list timestamps in a directory and if they are older than x amount of days delete the directories. It seems that in my for l