<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cdrokade%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.EmailStyle15
        {mso-style-type:personal;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">Hi,</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">I am using
python 2.5 on sun solaris.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">I want to
limit the number of files returned by os.listdir() to some number (say 1000),
how can I do it ?</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">Also I wan
to list the files only if they are older than some x days, how can I do it?</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">I can do
this through shell script using command.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">find ${ DIR_PATH}
-mtime +`expr ${PERIOD} - 1` -type f -exec ls <span style=""> </span>-l {} \;</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">I want to
have similar functionality like above through python. I don't want to list the
whole files in directory and go to each file for checking it's modification
time.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">I am
thankful for any pointer.</span></p>

<br clear="all"><br>-- <br>Thanx & Regards,<br>Deepak Rokade<br><br>Do what u Enjoy &<br>                Enjoy what u Do...........<br>