Find 'count of older files' in a folder?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Find 'count of older files' in a folder? Fri Jun 27, 2025 3:04 pm • by tekguru
Guys is it possible to get the number of files in a folder? Specifically, I want to retain the latest xx number of files that I keep as backups in a folder and delete the older ones?
I know it must be possible (I think) but I can't find such an option...
Thanks for any help in advance.
tekguru
 
Posts: 23
Joined: Tue Dec 07, 2021 3:09 pm

You can use a condition like "Date is not among the X most recent" to match files outside of the X most recent files, based on whatever date attribute you want to use.
Mr_Noodle
Site Admin
 
Posts: 11933
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Find 'count of older files' in a folder? Mon Jun 30, 2025 10:11 am • by tekguru
Ah ha, thanks I'll give that a try!

Is it best to use 'Date Created' or 'Date Last Modified'?
tekguru
 
Posts: 23
Joined: Tue Dec 07, 2021 3:09 pm

That really depends on your needs. Look at the dates in Finder and see which one makes more sense.
Mr_Noodle
Site Admin
 
Posts: 11933
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Find 'count of older files' in a folder? Tue Jul 01, 2025 10:27 am • by tekguru
Okay will do :)
tekguru
 
Posts: 23
Joined: Tue Dec 07, 2021 3:09 pm


Return to Support