Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a Windows utility that would analyse which files are being most frequently used on one's machine? It should be able to store this statistics over several user sessions...

It would help one's machine to be optimized afterwards using tools like Sysinternal's contig.

P.S. ...well at least until I get myself a Seagate Momentus XT 750GB that'd do that for me internally and even better.

share|improve this question

2 Answers 2

Windows does this automatically - it tracks frequently accessed files and sets them up to be prefetched if you have enough RAM (on recent versions).

Otherwise, you can use advanced defragment tools to move frequently accessed files to the outer tracks of your disk (where the read rate is faster).

You want to find the most often accessed files and then defragment them using contig. First, get a list of all the files that are most frequently accessed.

You need to write a script which will walk all the files in your directory tree from C:\ and generate a list of all the filenames ordered by which were accessed most recently. I would suggest you choose to only filter by files that are above a certain size, e.g. 8 MB, else you'll end up with thousands of system files. Then with this list, iterate over it and run contig against them (or there might be a way to give contig a list of files).

If you don't have the skill to achieve this, an alternative is to purchase an SSD, which does not suffer from fragmentation.

Note; Windows Vista+ disable access timestamps for perforamnce reasons. Enable it with this administrative command:

fsutil behavior set disablelastaccess 0
share|improve this answer
    
Well having them continuously written on the disk can speed this prefetching just as well so it still makes sense to write them continuously on the disk. –  Robert Koritnik Feb 13 '12 at 23:05
    
I'm not sure your comment makes sense. Defragmenting and prefetching achieves to optimise your machine based on most frequently accessed files. That is exactly the end result you wanted, is it not? –  deed02392 Feb 14 '12 at 18:08
    
Maybe you're oversimplifying the defragmentation bit... Or maybe I am... AFAIK defragment won't continuously write whole files or even all files... Not to even mention some files that can't be defragmented with built-in defrag... As I think it works is that defrag does defrag heavily fragmented files but leaves others. Or even maybe leaving larger files with larger fragments. But they still stay fragmented in the end. –  Robert Koritnik Feb 14 '12 at 23:27
    
What do you mean by 'continuously write whole files'? –  deed02392 Feb 15 '12 at 8:45
    
Continuously as in: together as the whole file so seek times between reads are kept at a minimum. Ideally head shouldn't move at all (which of course depends on file size). –  Robert Koritnik Feb 16 '12 at 1:04

Since you're already using contig, use it to know which files are fragmented and save it in a file.

Example:

C:\Program Files (x86)\Sysinternals Suite>contig -a -s C:\Users > C:\Users\sysop
\documents\fragAnalyze.txt

But this is too much complicated since this command give you a list of all files, including defragmented ones AND not in usable format such as .csv file format.

Suggestion:

You can check which files are fragmented with third party softwares like Piriform's Defraggler or Ultradefrag which allow you to list fragmented files...

Hints:

Most of the time, the most fragmented files for users are located in C:\Users*UserName*\AppData\Roaming or C:\Users*UserName*\AppData\Local...

Especially in the subdirectories of these folder for frequently used applications such as Web Browser...

These fragmented subdirectories may be defragmented using contig and the Windows Scheduler... The contig command line is set to "quiet" and check subdirectories.

{full path} contig -q -s {drive:}{full path of folder}

Hope this help. Let us know.

enter image description here

share|improve this answer
    
You don't have to always start this scheduled command: you may also disable the command schedule and enable it when needed, Just start it manually for example... Many possibilities exist as you know... :) –  climenole Feb 13 '12 at 20:48
    
But the thing is I'm not after fragmented files but rather mostly accessed ones that are fragmented. Contig will be used in the end to make those files faster, but I need something before that that will watch disk activity over several days and they give me a rough idea of mostly accessed files. Especially if they're accessed for reading. –  Robert Koritnik Feb 13 '12 at 23:10
    
Okay. So try NirSoft's SearchMyFiles. This utility allow you search files by wildcard, by last modified/created/last access time and so on... Hope this help. :) –  climenole Feb 13 '12 at 23:38
    
I really appreciate your effort to give me suggestions and a decent answer but... But this won't do the trick either. This will merely give me information about which files I've accessed lastly. What if I open some file I haven't opened for a year just before I run this program? I don't think I would get relevant results... I suppose I will have to try using Process Monitor... –  Robert Koritnik Feb 14 '12 at 10:33
1  
Not sarcastic at all. Process Monitor is one of the most useful utility for Windows (thanks to Mr. Mark Russinovich). Have a nice day. :) –  climenole Feb 14 '12 at 23:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.