@Files Move Files Based on Creation Date

Easy enough.

  1. Remove the Prompt for Destination Folder

    .
  2. Change the Move files Action to "Trash":

Again, easy enough. A simple change to the find command:

To use the Creation Date:
find "$KMVAR_MFB__SourceFolder" -type f -maxdepth 1 ! -newerBt $KMVAR_MFB__Date

To use the Modification Date:
find "$KMVAR_MFB__SourceFolder" -type f -maxdepth 1 ! -newermt $KMVAR_MFB__Date

The key changes here are:

  1. Use of the NOT operator: !
    which will mean NOT newer than the specified date (or, PRIOR to the specified date).
    .
  2. Setting the newer parameter based on the date field you want to use:
  • newerBt for Creation Date
  • newermt for Modification Date

So, while the basic changes are relatively simple, putting it all together in a safe manner requires quite a few other changes. Thus, I have made a new Macro just for selecting and moving the files to Trash.

See: MACRO: @Files Trash Files PRIOR to Date Specified @Example

2 Likes