Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Trying to make a new dimension to file management interface. I want a situation where files that's are 1wk old should be in a folder, same goes with 2wk old in a different folder same goes with 3 while greater than 4weeks in another folder .. This is exactly what i mean in a datagridview.

*.Docx *.Pdf *.txt *.xls *.jpeg

< 1Week 3

2Week 5

3Week 1

> 4Week 2


NB: The numbers represent number of files(docx,pdf,txt,xls) that are present and how old they are.

So clicking on the numbers the user gets the details of all the files and other file details. Would really appreciate any help on this.

Thanks in advance.
Posted
Updated 18-Oct-11 19:48pm
v3
Comments
Orcun Iyigun 18-Oct-11 17:59pm    
So in which part of your question you need help?
Hakeem Giwa 23-Oct-11 20:19pm    
Displaying a gridview like the above according to AGE and also grouping different files types in a column. thanks in advance
kiran dangar 19-Oct-11 1:42am    
Do you want to fetch counts of each File types? or your question is how to display that data in GridView?? Please elaborate
Hakeem Giwa 23-Oct-11 20:22pm    
I want to fetch counts and also displaying the numbers on a gridview .... By clicking on the number i want details of files(docx,pdf,txt,xls) ..... Thanks in advance ...
krishna_goluguri 19-Oct-11 2:00am    
hi u wanted to disply in the gridview according to the week or you wanted to transfer the files to different folders according to week clarify your question

1 solution

I think there is a limitation with the fileinfo attributes where you can only get the creation date however I would:

Use DirectoryInfo to loop through the FileInfos in a folder checking the attributes
Use create/modified date comparing it to the current system date.
Use the extension property to manage the extension list adding a record to your collection when a new extension is needed or incrementing the count.

If you intend to move the files around according to their age you are in for a LOT of work. I would have folders for each week in the year (201109) for the 9th week in the yaer and move the files into that folder NEVER having to move them again. Age from the current date is a moving target.
 
Share this answer
 
Comments
Hakeem Giwa 23-Nov-11 22:07pm    
HiTop of the hour to you. Its been a really long time was down with some issues so i couldn't follow up with the tread anymore.

I would need your help on the code to do that in asp.net c# (Web app).
See this image for help. http://giwaakim.blogspot.com/2011/11/blog-post.html

Thanks in advance
Mycroft Holmes 23-Nov-11 23:17pm    
Two things, blogspot is blocked by our net nazi and I have my own work to do.
Hakeem Giwa 24-Nov-11 5:19am    
Thanks for your response. But is there any other way you could help me with this? .
Mycroft Holmes 24-Nov-11 17:52pm    
Sure when you have a specific coding problem post it in Q&A, someone generally will help. The idea that 1 person is going to get involved in your coding issues is just not the way it works.

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