Re: [Tutor] Finding the latest file in a dir

2014-01-05 Thread Dominik George
Hi, > OSError: [Errno 2] No such file or directory: 'alfresco20140104-.sql' > I get results if I do it without giving the dir location such as That is because the getctime call will run based in the current working directory. You can use a construct like: max([os.path.join('opt', 'foo', x

[Tutor] Finding the latest file in a dir

2014-01-05 Thread Joseph John
Hi All, Even though I am a old user in the mailing list, my skills in Python are not impressive. I have restarted doing python for some small task. I am trying to find the latest file in a dir, I have searched and found out I shoulld do in this way #!/usr/bin/python import os newe