Jump to content

Move to new folder


Recommended Posts

Introduction

This workflow takes a file or files selected in Finder and moves them to a folder which is newly created in the course of the workflow. You are prompted for the location of the new folder and for the name of the new folder.

Usage

1. Simply select a file or files in Finder, press your Universal Action hotkey (⌘ + / by default) and, if this workflow title does not appear at the top of the list of your Universal Actions, start typing Move until you see the name of this workflow.

UA.thumb.png.451af5c43524181292b362971eb757a9.png

2. Choose the folder in which you wish to create the new folder. Just start typing the name of the folder to see a list of matching folders from which you can select the appropriate one. (See also the important note below about discovery of folders.)

Location.thumb.png.5fc00569c1bea2c1da4798f47d22eb77.png

3. You will then be prompted for the name of the new folder.

Foldername.thumb.png.381246f899ad8e5269c1a8995e6f7a18.png

The new folder will be created and the files moved (not copied) to it—with a notification to confirm what has happened.

Important notes

  • In order for a folder to be found in the second step of the workflow it must be within your default search scope. (See Alfred Preferences → Features → Default Results and look under Search Scope.) However, if you want to be able to find folders outside that scope just double click on the workflow File Filter, go to Scope and drag in the folder(s) you wish to be included within the file filter search scope.
  • The sound can be muted in the workflow configuration.

 

Acknowledgement

I am indebted to @sepulchra for the provocation to write this workflow but, particularly, for invaluable help and advice developing and testing the workflow. However, if there are errors or infelicities in the final workflow they are mine.

 

GitHub download link

 

Stephen

Edited by Stephen_C
Typo <sigh>
Link to comment

@Stephen_C Hi Stephen, I'm the OP of the thread that set this in motion.

Really grateful to you and @sepulchra for making this!!!

 

It didn't work at first, but I saw in the debugger:

[16:50:58.025] ERROR: Move to new folder[Automation Task] Task not found 'com.alfredapp.automation.core/files-and-folders/directory.new'

 

I looked at the workflow and the Automation Task said "Automation Not Found" (or words to that effect). I clicked on it and my Automation Task list was empty. I clicked Update Tasks and it populated with all the tasks (guess I never used Automation Tasks before!). 

 

It's working fine now.

 

Thanks again. What a great community!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...