View Single Post
  #1 (permalink)  
Old November 21st, 2005, 03:59 AM
abhisheksud abhisheksud is offline
Authorized User
Join Date: Aug 2005
Location: Mumbai, Maharashtra, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abhisheksud Send a message via Yahoo to abhisheksud
Default Sort the files in folder

I am making a webpage which shows all the file in a folder and make links to the file. However i want to know how i can sort the view of files according to file name or date created of by size(any one). I am using the for loop statement for displaying all the files.what modification should i do so that all the files are shown alphabetically in acending order...Also the file size is shown in bytes as a default. How can i make these appear in mb or kb to decimal digits....Pl help me out... the code which i am using is given below

for each file in files %>
<td style="width: 164px"><br />
<a href="patches/<>"><></a></td>
<td style="width: 196px" align=center><br /><%=file.size %> Kb</td>
<td style="width: 230px" align=center><br /><%=file.DateLastModified %>