PURPOSE: MOVE Items in Finder Selection to Destination Folder Chosen by User
HOW To USE:
Select one or more items (files and/or folders) in the Finder
Trigger this Macro
MOVE will be CANCELED if the User cancels the Choose Folder script, OR clicks on "Stop" in the "Confirm Move" alert.
Note that the App focus starts on the Finder, and remains the same after the macro completes.
BASED ON THIS USER QUESTION:
Can KM display a set of folders, say all folders in the Documents folder or a list of folders (or alias of folders) I create in the Documents folder (or some other folder) that when I click on a folder within that set of displayed folders will move a previously selected file in the Finder to that folder and return me back to the folder I made the file selection from?
The variable DestinationFolder is getting set to that location in /Library inside theSCRIPT: Choose DESTINATION Folder script. If I extract that script and run it in Script Debugger, I don’t get this result. I’m not using DestinationFolder in any other macro, and even when I add an action to Set Variable 'DestinationFolder' to Text' (setting it to an empty string), I still get the weird result. Something is going on with the script in the action but I haven’t been able to isolate it.
I’ve left ParentFolder set to ~/Documents which is fine for me. That bit is working OK.
I’ve rebooted several times, and get the same result. Not sure why iMindMap’s QuickLook generator has anything to do with anything here, and I’ve definitely never grabbed its file:// path for any reason.
I’m sure it’s something very obvious that I’m fat fingering or ignoring :frown:
Thanks for replying. I’m using ~/Desktop and subfolders of ~/Documents. If I extract your script “Choose DESTINATION Folder” entirely and run it in Script Debugger I have no errors. For example, the value returned in destinationFolder is ~/Desktop, or whatever I choose in the dialog. I don’t know if that’s useful info.
Hey @JMichaelTX – it does fix it. Thanks so much for your help. I like this macro.
Next thing I plan to do is extend the macro to grab the lists of Favorites and Recent destinations from Default Folder X and optionally offer them as destinations for your move macro. I’ll post my update whenever I have a chance to do those mods.
(Sorry I cannot mark your reply as a solution – since I’m not the OP in this thread – but kudos anyway )
I have a lot of project folders and it can take some mouse actions to scroll down to the right one. Would it be possible to add an incremental search for the project folder name? E.g. I start typing m,u,e to have the project folder mueller selected? Or would that require a full blown app? ;).
Anyway, many thanks for this nice macro.
I just had an idea: When I switch the View mode to the List display instead of the [||_] one (don’t know what it’s called), then the problem is solved. So I’ll google for how to switch to this List display ;).
It’s at easy as using this AppleScript:
tell application “Finder” to ¬
set the current view of the front Finder window to list view
A good solution for this is to make a set of macros with the same trigger, each of which moves the files to a specific folder. Then Keyboard Maestro will use the Conflict Palette to let you select the desired folder.
I've got a huge folder of PDF books that I want to organize. To start with I want to categorize the books into big folders like FRENCH, MATHEMATICS, and so on. So far, those aare the only two I've tried.
I changed this action to hard-code the destination folder to either FRENCH or MATHEMATICS, based on whether I press one key chord or another.
For some reason, to move five or six files, this action takes fifteen to twenty seconds.
The only non-standard thing I'm coping with is that the files are in a Dropbox folder that I have mounted using an app called Cloud Mounter. So my destination folder looks like:
Hey @JMichaelTX, I'm playing with Path Finder. How does this need to be modified to work with it? I added "The running applications" to the For each collections in the Move Each Item in Finder Selection... action but it's not that easy. Maybe some directions for me to begin to understand this macro or a fix if you'd rather not get into teaching mode? I'm guessing the MSF_FinderItem variable doesn't see the selection when the section is within Path Finder. Maybe replace it with MSF_PathFinderItem or does the coding of this whole action include the Finder in a way that makes it unusable with Path Finder?
Thank you @JMichaelTX , I pulled the various pieces together and to my surprise it worked. It's now a tool I'm going to get a lot of mileage out of.
@ccstone , I read all the items that that search brought up. While I could get the gist of what was being said, there are too many holes in my understanding to use those pieces. What one book would you recommend to begin learning AppleScripting?
I'm going to either going learn enough to be able to use the support generously offered here or just hire someone to write whatever code I need. I have no commitment to this inbetween place my current level of understanding leaves me.
Script Debugger 7 -- a full IDE for developing AppleScript.
SD7 now comes with a 20-day free trial, and then will gracefully downgrade to the FREE SD7 Lite (which is still much better than Script Editor).