I have a macro that produces a list of files from a directory that were modified in the last 1 day or 7 days, or 30 days. I'd like to refine this so it shows how many are new and how many are modified. I know the ctime/btime and mtime should handle this but for some reason, maybe because the folder is a Dropbox folder, the ctime/btime terminal commands don't produce the right output. I have read the wiki "Working with dates and times in Keyboard Maestro" and it is confusing with its reference to epoche time.
Fortunately, the files all have a prepended UID in the form of year, month, day, hour, minute. ie: 202007261547 Community And Communication.md. This leads to being able to 'ls | grep 2020' and get all the files created in 2020. Same for month 202007 and even day 20200726. My question is how do I get the year month day as a variable without being prompted for it every time? Is there a way? And if I wanted a range of days like 7 days for a week's worth, how would I do this?
Here is a file list. Can be downloaded at https://www.dropbox.com/s/qqm5ozrjgcrwe6u/File%20List.md?dl=0