Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

How can I have a counter for the program that removes the file with minimum access from hard disk?
Posted
Updated 11-Aug-10 13:27pm
v2
Comments
AspDotNetDev 11-Aug-10 18:04pm    
Huh?
AspDotNetDev 11-Aug-10 18:06pm    
I deleted your duplicate question. If you need to change your question, just edit the original rather than post a new one.
Dalek Dave 11-Aug-10 19:27pm    
Minor Edit for Grammar.
Peter_in_2780 11-Aug-10 19:29pm    
Even DD's edit hasn't made the question comprehensible.
Dalek Dave 12-Aug-10 3:23am    
I think think the OP wants to check on files in a directory and remove the ones that have been accessed the least number of times.

1 solution

Sorry, I don't understand the question.

The System.IO namespace contains the file object, there is an method GetLastAccessTime(...), then you know this information for just one file, but afaik there is no counter, how often the file was accessed before.
 
Share this answer
 
Comments
Niklas L 12-Aug-10 3:11am    
Your answer actually made some sense of the question. Weird. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900