Move All Files on the Desktop to a New Dated Folder

I'm trying to make a shortcut for such an action in Finder:
Create folder by date (for example 2023 01 22) > Move all files from Desktop to created folder.
can someone help me with this? Thank you very much for you help.

Best ragards

Hey @Kristijonas,

Welcome to the forum!  :sunglasses:

You can do this type of job with native Keyboard Maestro actions instead of AppleScript, but I prefer using AS – because you can use Undo in the Finder if you goof.

The KM actions don't provide that functionality.


Consolidate Desktop Files into a Named Folder v1.00.kmmacros (8.6 KB)
Keyboard Maestro Export

Hi @Kristijonas. I've got a multi-function Finder macro in development that can do this (the default folder format is YYYY-MM-DD, but it can be changed) and much more. It's almost ready for general release, but if you are interested and have a little time to provide feedback, see the following...

Want to Help Test a Finder-related Macro?

If you'd rather not, no problems whatsoever.

Thank you very much, I'll try!

Nice, it works! But it takes only files, not folders :slight_smile: How to edit it to move eveything?

You only specified files in your OP...

Try this:

Consolidate Desktop Items into a Named Folder v1.00.kmmacros (8.6 KB)

Macro Image

Keyboard Maestro Export

Wow, awesome, it works!

What lines should I add, or how can I configure this script to move Gathered folder to “~/Tidy Up“ folder?

set nameStr to "Gathered " & dateStr

Change "Gathered " to whatever you want, but leave the quotes – they're necessary to tell AppleScript the characters are a string object.

I mean I wish to move created Gathered folder to another location, for example: Home/Tidy Up/Gathered :slight_smile:

1 Like

Whups – that's what I get for working before coffee...

See this:

Macro – Tidy Desktop

It includes user customization for:

  • Parent Tidy folder location.
  • Tidy folder name and date-stamp format.
1 Like