note
dsheroh
[snopal] beat me to the suggestion of using filesystem data to sort them correctly.
<p>
The reason that "<i>it is taking the elements as strings even though i gave it to sort in numerical way"</i> is because the filenames start with text, not numbers. If they were formatted as <code>7_jul_2007_webadmin.log</code>, then your sort idea would have worked (until <code>1_aug_webadmin.log</code>, at least - any change of month would break it) but, with the current filename formatting, all of the filenames have a numerical value of 0, so sorting them numerically doesn't do much.
627012
627012