AutoHotkey Community

It is currently May 27th, 2012, 9:45 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: December 2nd, 2004, 4:02 am 
Offline

Joined: November 29th, 2004, 10:24 am
Posts: 10
I would like to see options to sort a list of files based on any of the available properties like Name, Size, Modified Date, Type.
For now, my particular need is to develop a mechanism which would completely eliminate the use of "Start Menu". After I have started using AHK, I find it quite difficult to go to Left-Bottom corner to access anything and then come back to center. Thanks for that!

But the only that is left in making this possible is Recent Documents list.
Sorting on modified date is the only reason I could not implement any replacement for it.
Further, "Recent Documents" also stores recent folders but surprisingly I could not find an easy method to use that information. I would like to use that folder list also (of course sorted on modified date). This would make the use of "FavoriteFolders" even more interesting.

Please help me realizing this!

_________________
Sandeep


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 2nd, 2004, 3:35 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Here is an example that sorts files by modification date. I'm not sure how Recent Files stores its dates, so you might need to change this to use Creation Date:
Code:
FileList =
Loop, %UserProfile%\Recent\*.*, 1
   FileList = %FileList%%A_LoopFileTimeModified%`t%A_LoopFileName%`n
Sort, FileList
Loop, parse, FileList, `n
{
   if A_LoopField =  ; Omit the last linefeed (blank item) at the end of the list.
      continue
   StringSplit, FileItem, A_LoopField, %A_Tab%  ; Split into two parts at the tab char.
   MsgBox, 4,, The next file (modified at %FileItem1%) is:`n%FileItem2%`n`nContinue?
   IfMsgBox, No
      break
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 2nd, 2004, 4:04 pm 
This is working fine. Thanks!
I didn't notice that we already have %A_LoopFileTimeModified% within loop.

Sandeep


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group