Chirag Patel
asked on
count files in a directory according to date modified
Experts,
I am looking a tool that will help me count the number of files in a directory according to date modified.
Manually I am sorting the files by date modified, highlight the group of files for particular date, right clicking and checking properties.
Please help.
I am looking a tool that will help me count the number of files in a directory according to date modified.
Manually I am sorting the files by date modified, highlight the group of files for particular date, right clicking and checking properties.
Please help.
Here is a demo result for one folder (and optional subfolders) in only one location.
Modified after 1/8/2011
Result = 257
opus.JPG
Modified after 1/8/2011
Result = 257
opus.JPG
Hi cpatelx,
I wrote an article (with a program) here at EE called Count and Total Size by File Type. I may be able to modify it to do what you want. I'm thinking of something like this:
Before I even start the effort, I want to know if this is what you're looking for. If not, please post a mockup of what you'd like. No promises that I can do it, but I'll be happy to give it a look. Regards, Joe
I wrote an article (with a program) here at EE called Count and Total Size by File Type. I may be able to modify it to do what you want. I'm thinking of something like this:
Before I even start the effort, I want to know if this is what you're looking for. If not, please post a mockup of what you'd like. No promises that I can do it, but I'll be happy to give it a look. Regards, Joe
Have you tried the group by feature
Create visual breaks for easy organization (Group by)
In addition to arranging and sorting, you can also group files by property. Like sorting, grouping won't significantly change the way files are displayed. It just breaks them into different sections, depending on which property you choose. So, if you have a folder full of text documents, you might want to group them by type to see which program was used to create them. Or, if you're dealing with photos, you can group them by date to separate them by the date they were taken.
To group your files by property
Open the folder or library that you want to group.
Right-click an empty space, point to Group by, and then click a property (such as Type).
If you don't see the property you're looking for in the Group by menu, click More to add properties.
If you want to remove the grouping separation in a folder or library, just right-click an empty space, point to Group by, and then click (None).
Detailed Here for Win 7: http://windows.microsoft.com/en-in/windows7/arrange-sort-or-group-your-files
Create visual breaks for easy organization (Group by)
In addition to arranging and sorting, you can also group files by property. Like sorting, grouping won't significantly change the way files are displayed. It just breaks them into different sections, depending on which property you choose. So, if you have a folder full of text documents, you might want to group them by type to see which program was used to create them. Or, if you're dealing with photos, you can group them by date to separate them by the date they were taken.
To group your files by property
Open the folder or library that you want to group.
Right-click an empty space, point to Group by, and then click a property (such as Type).
If you don't see the property you're looking for in the Group by menu, click More to add properties.
If you want to remove the grouping separation in a folder or library, just right-click an empty space, point to Group by, and then click (None).
Detailed Here for Win 7: http://windows.microsoft.com/en-in/windows7/arrange-sort-or-group-your-files
ASKER
Joe,
That would be perfect. I don't even need the size. I will just need to the modified date and count.
They are all pdf files.
That would be perfect. I don't even need the size. I will just need to the modified date and count.
They are all pdf files.
A final post on Directory Opus (I'm a real fan!)
You can see W:\SOFTWARE as the search location.
You can add as many locations as you want for a single search.
The 60 day trial is deliberately long so as you get you hooked.
The only negative is that it ain't cheap.
You can see W:\SOFTWARE as the search location.
You can add as many locations as you want for a single search.
The 60 day trial is deliberately long so as you get you hooked.
The only negative is that it ain't cheap.
OK, I'll take a look at my code now to see if I can modify it for you. Give me an hour or so. Regards, Joe
ASKER
Thanks Joe
Thanks Eirman.. I am trying Directory Opus. Only downside is that I would have to search each date to find out the number of files for that date.
Also Thanks Amit - I tried the group by method and unfortunately it only group by today's date and groups the rest as 'Earlier this year'
Thanks Eirman.. I am trying Directory Opus. Only downside is that I would have to search each date to find out the number of files for that date.
Also Thanks Amit - I tried the group by method and unfortunately it only group by today's date and groups the rest as 'Earlier this year'
cpatelx,
Do you want the counts to include subfolders? Regards, Joe
Do you want the counts to include subfolders? Regards, Joe
cpatelx,
Sorry for the bad one-hour estimate, but after looking at the code, I decided to go through with the modifications (and testing!), so the program is done now...took longer than I thought it would...sometimes taking out code is tougher than putting it in. :)
Forget that previous question — it was easy enough to make it in an option:
But here's a different question for you: do you want the date field in the spreadsheet to be text or date format? The program is working and right now the field is text, so the spreadsheet looks like this:
Under the covers, the CSV has a value in those fields like this:
="20131205"
But I could make that:
=DATE(2013,12,05)
So the spreadsheet would look like this:
Which do you prefer? Regards, Joe
Sorry for the bad one-hour estimate, but after looking at the code, I decided to go through with the modifications (and testing!), so the program is done now...took longer than I thought it would...sometimes taking out code is tougher than putting it in. :)
Forget that previous question — it was easy enough to make it in an option:
But here's a different question for you: do you want the date field in the spreadsheet to be text or date format? The program is working and right now the field is text, so the spreadsheet looks like this:
Under the covers, the CSV has a value in those fields like this:
="20131205"
But I could make that:
=DATE(2013,12,05)
So the spreadsheet would look like this:
Which do you prefer? Regards, Joe
ASKER
Joe,
Thank you! text format is fine. I also test the original script and it works good!
Once again thank you, this program will help me great deal.
Thank you! text format is fine. I also test the original script and it works good!
Once again thank you, this program will help me great deal.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Joe
ASKER
I will do some testing now
You're welcome. Even though you closed the question, please post back here with the results of your testing...and the "production" runs! I'll be glad to help if you run into any issues. Regards, Joe
ASKER
Joe,
Would it too much effort to get the date format? Also, for the first results.. I am getting a prompt if to include sub folders and although selecting yes, it's not including sub folders.
Please help :)
Would it too much effort to get the date format? Also, for the first results.. I am getting a prompt if to include sub folders and although selecting yes, it's not including sub folders.
Please help :)
I think I can do date format quickly — I'll look at it right now. I just tested subfolders here and it worked perfectly. Please re-download the script and try again.
ASKER
Yes! indeed it is including sub folders.. I apologize. I had to reread your post above regarding 'Date='2014,**,**'.
ASKER
Good results! I verified the count for about 10 dates thus far
OK, very relieved to hear that! I was getting worried, as it works fine here and couldn't understand why it wasn't for you. I'm working on a new version with the date format instead of text. Regards, Joe
Attached are two new versions (the file names make it clear which is which). One creates entries like this:
=DATE(2013,12,05)
The problem with the above is that you then have to format the cells to Date format.
The other one creates entries like this:
2013/12/05
Excel automatically formats these to Date format.
I can see pros and cons to each. Use whichever you prefer. Regards, Joe
File-Counts-DATE-formula.ahk
File-Counts-slash-format.ahk
=DATE(2013,12,05)
The problem with the above is that you then have to format the cells to Date format.
The other one creates entries like this:
2013/12/05
Excel automatically formats these to Date format.
I can see pros and cons to each. Use whichever you prefer. Regards, Joe
File-Counts-DATE-formula.ahk
File-Counts-slash-format.ahk
ASKER
Thanks Joe! I have been testing both with good results. Although, I am wondering if the script can be modified to limit it to one day. For instance, if I provide an input date.. it would scan through the folders/subfolders and give me a count for files modified or created on that input date.
subfolder1= xxx (count)
subfolder2=xxx
etc
Please let me know your thoughts. Once again, I appreciate your help a great deal.
subfolder1= xxx (count)
subfolder2=xxx
etc
Please let me know your thoughts. Once again, I appreciate your help a great deal.
Glad to hear all of the scripts are working for you. Limiting it to one day is easy, but are you also asking that the count be reported by subfolder? That's not so easy. And are you now saying that the date stamp can be the Modified OR the Created date?
ASKER
Yes, reported by subfolder would help because we have one main folder with about 40 subfolders. each subfolder is brown down to year and another subfolder for months.
Sorry - Modified or created should not matter.
Sorry - Modified or created should not matter.
Give me an example of the names of the main folders and subfolders.
ASKER
Main folder are named 10,17,65...100,101... 200.
Inside each.. are subfolders named (by year) 2012,2013,2013
Inside those.. are subfolder named (by month) Jan, Feb, Mar.. etc
So, if I ask to get a count for 2/10/14
Each main folders should have a subfolder 2014..with another subfolder for FEB
Ideal Output I am looking for is
For 76 = *** on 2/10/14
100= *** " "
101 =*** " "
I hope that I am making sense..
Inside each.. are subfolders named (by year) 2012,2013,2013
Inside those.. are subfolder named (by month) Jan, Feb, Mar.. etc
So, if I ask to get a count for 2/10/14
Each main folders should have a subfolder 2014..with another subfolder for FEB
Ideal Output I am looking for is
For 76 = *** on 2/10/14
100= *** " "
101 =*** " "
I hope that I am making sense..
So an example folder is D:\76\2013\Jan\
Right? (Of course, D: is just an example...could be any drive.)
Right? (Of course, D: is just an example...could be any drive.)
Our messages just crossed...that screenshot helps a lot.
Why are you(plural) trying to design the wheel again!
Directory Opus does it all and so much more.
Try the Flat View of a folder structure just for starters.
I know it's a nice programming challenge .... but why?
(No offense intended ..... honest!)
Directory Opus does it all and so much more.
Try the Flat View of a folder structure just for starters.
I know it's a nice programming challenge .... but why?
(No offense intended ..... honest!)
> No offense intended ..... honest!
None taken. I hear you on Directory Opus. I've been using Total Commander for around 20 years (better than DOpus in my opinion, although I played with DOpus only for a short while, and I haven't tried it in recent years, as there's nothing I haven't been able to do with TC from a file management perspective; I'm sure in the hands of a DOpus expert like you it can do everything TC can). The thing is, sometimes a small, targeted effort that solves a specific problem is better for a user than learning a complex tool, like DOpus or TC. Some folks can manipulate their file managers like the back of their hands — not the case for all users.
For example, I have an updated version of the program posted here that contains a nicer UI, supporting radio buttons for inclusion of subfolders (yes/no) and a drop-down for the three choices of format for the CSV date cells. The UI looks like this:
It does exactly what the user needs and is simple to use. Is it designing the wheel again? Maybe. Could this be done with DOpus or TC? Probably. But I don't think it would be as easy to use.
So, based on the asker's new question, can you describe the steps and/or post screenshots of output from DOpus that shows a date as input and then the count of files whose modified date matches the input date, with the count being shown for each folder, starting from a root folder and traversing all subfolders? Regards, Joe
None taken. I hear you on Directory Opus. I've been using Total Commander for around 20 years (better than DOpus in my opinion, although I played with DOpus only for a short while, and I haven't tried it in recent years, as there's nothing I haven't been able to do with TC from a file management perspective; I'm sure in the hands of a DOpus expert like you it can do everything TC can). The thing is, sometimes a small, targeted effort that solves a specific problem is better for a user than learning a complex tool, like DOpus or TC. Some folks can manipulate their file managers like the back of their hands — not the case for all users.
For example, I have an updated version of the program posted here that contains a nicer UI, supporting radio buttons for inclusion of subfolders (yes/no) and a drop-down for the three choices of format for the CSV date cells. The UI looks like this:
It does exactly what the user needs and is simple to use. Is it designing the wheel again? Maybe. Could this be done with DOpus or TC? Probably. But I don't think it would be as easy to use.
So, based on the asker's new question, can you describe the steps and/or post screenshots of output from DOpus that shows a date as input and then the count of files whose modified date matches the input date, with the count being shown for each folder, starting from a root folder and traversing all subfolders? Regards, Joe
can you describe the steps and/or post screenshots of output from DOpus that shows a date as input and then the count of files whose modified date matches the input date, with the count being shown for each folder, starting from a root folder and traversing all subfolders?I'll try
It's much easier than I thought (It takes 20 seconds when you know how!) ....
I choose a lister output and to show a file count column.
I checked the results and nothing modified in 2012 or earlier is counted.
Instead of After I could have chosen On, Before, After, Between, Not Between, Within
I could easily have added a filter(s) and more root folders.
And this is a simple search. The advanced search allows one to combine multiple simple searches and to use more criteria (e.g. regular expressions) and save the search for future use.
I'm using Dopus 9 (10 is the latest).
I know 30% of the program and features so I am far from being a expert.
I choose a lister output and to show a file count column.
I checked the results and nothing modified in 2012 or earlier is counted.
Instead of After I could have chosen On, Before, After, Between, Not Between, Within
I could easily have added a filter(s) and more root folders.
And this is a simple search. The advanced search allows one to combine multiple simple searches and to use more criteria (e.g. regular expressions) and save the search for future use.
I'm using Dopus 9 (10 is the latest).
I know 30% of the program and features so I am far from being a expert.
ASKER
I am re-installing directory Opus. I will try the search method you mentioned above. I agree with ..it does exactly what the user needs and is simple to use. The new UI looks great!
I will have to familiarize myself with Directory Opus.. it does have many features and uses. I will also try Total Commander!... And, I can't wait to try the new script with new UI :) this is all good information for me! Thank you.
I will have to familiarize myself with Directory Opus.. it does have many features and uses. I will also try Total Commander!... And, I can't wait to try the new script with new UI :) this is all good information for me! Thank you.
Here's a link for a 10% Discount
http://www.dearopus.com/opus-coupon.html
Comments by Total Commander users
http://resource.dopus.com/viewtopic.php?f=3&t=20283
http://www.dearopus.com/opus-coupon.html
Comments by Total Commander users
http://resource.dopus.com/viewtopic.php?f=3&t=20283
Hi Eirman,
I haven't been able to get TC to show the number of files in each folder that met the search criteria (the Files column in your screenshot). It may be doable, but...I don't know how. :)
Hi cpatelx,
Attached is the version with the new UI. Give it a spin and let me know how it works for you. After thinking about your new requirement for a bit, I don't believe that it is a simple change to the existing code...and one can spend only so much time working for free here at EE. :) If you're happy with the DOpus solution for the new requirement, you're probably better off spending your money on that than a custom development, unless the UI is really critical for you. Regards, Joe
File-Counts-GUI.ahk
when you know how!Yes, that's the key point for many folks! That said, your DOpus approach is very nice. Is it possible to feed the results into a CSV or Excel file, or even a plain text file?
I haven't been able to get TC to show the number of files in each folder that met the search criteria (the Files column in your screenshot). It may be doable, but...I don't know how. :)
Hi cpatelx,
Attached is the version with the new UI. Give it a spin and let me know how it works for you. After thinking about your new requirement for a bit, I don't believe that it is a simple change to the existing code...and one can spend only so much time working for free here at EE. :) If you're happy with the DOpus solution for the new requirement, you're probably better off spending your money on that than a custom development, unless the UI is really critical for you. Regards, Joe
File-Counts-GUI.ahk
ASKER
Hi Joe,
Yes! output to CSV or Excel is awesome! Thank you I will run the new script. I completely understand regarding spending so much time. To be honest, I am not very familiar with DOpus, I am not able to replicate the results. The script is great. If there are any way, I would be happy to support your work and product.
Thank you... Chirag
Yes! output to CSV or Excel is awesome! Thank you I will run the new script. I completely understand regarding spending so much time. To be honest, I am not very familiar with DOpus, I am not able to replicate the results. The script is great. If there are any way, I would be happy to support your work and product.
Thank you... Chirag
I am not able to replicate the results.Make sure you are selecting "Lister Collection" in the top right rather than the default "find window"
I don't know if this terminology has been changed in ver10
ASKER
Hi Chirag,
Thank you for offering to support my work and product. Please look in my EE profile and send me an email to discuss it. Regards, Joe
Thank you for offering to support my work and product. Please look in my EE profile and send me an email to discuss it. Regards, Joe
They must have rearranged things in ver 10. This is what I see.
There is another way .... Use the very useful Flat view
This shows all files in all folders & sub-folders in one long list.
VIEW > FLAT VIEW > Mixed (No Folders)
Show the "modified" column and sort
Select the files you want and look at the file count at the bottom.
There is another way .... Use the very useful Flat view
This shows all files in all folders & sub-folders in one long list.
VIEW > FLAT VIEW > Mixed (No Folders)
Show the "modified" column and sort
Select the files you want and look at the file count at the bottom.
Once you use it, you will never go back to Windows Explorer
http://www.gpsoft.com.au/