Can I "Move selected to new folder"?

General discussions about LaunchBar
Post Reply
Zippy
Posts: 2
Joined: Thu Apr 24, 2008 8:14 am

Can I "Move selected to new folder"?

Post by Zippy » Thu Apr 24, 2008 8:22 am

I am a relatively new LB user, having become tired of frequent Quicksilver hangs, so I might have missed something but ...

I want to be able to select files in the Finder, cmd-space, cmd-G and send to ... "New Folder" and name it. This way I could gather loose items and drop them into a new named folder in one easy move. It would be even better if LB had a shelf to store them on like QS so I could select from several different locations first :)

Thank you

ludwigschubert
Rank 4
Rank 4
Posts: 285
Joined: Fri Jun 29, 2007 5:54 pm
Location: Germany, Bavaria

Post by ludwigschubert » Thu Apr 24, 2008 3:18 pm

Yes, the shelf feature would be pretty nifty.

As for a "New folder" - shouldn't that be possible via Applescript?
Some people in this forum should be able to help you with that, I think.

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Post by Dennis » Thu Apr 24, 2008 8:24 pm

Here's a simple script that will basically do what you're looking for.


Code: Select all

on open inputFiles
   tell application "Finder"
      set folderLocation to choose folder
      repeat with theFile in inputFiles
         try
            move theFile to folderLocation with replacing
         on error errorMsg
            display alert errorMsg
         end try
      end repeat
   end tell
   open location "x-launchbar:hide"
end open


Just copy and paste it into Script Editor and save it as a script called "Move to Folder" or something like that. Then select your item(s) in LaunchBar, hit tab, and select the Move to Folder script. It'll prompt you for a folder location (hit Shift-Command-N to create a new folder) and hit Return to save.

It might be nice to to have some way to create a new folder and pass the selected items into it all within LaunchBar, but that can currently only be done with multiple actions in LaunchBar by creating the folder first and then moving items into it:

1) Go to location you want the folder in LaunchBar
2) Hit Shift-Command-N to create a new folder and name it
3) Select the items you want with LaunchBar (e.g. with Command-G to get Finder selection) and hit Tab
4) Select the new folder you just created and hit Return
5) Select "Move" from the menu that appears

One small advantage the script has over the file moving feature in LaunchBar 4.3.7 is that if you're moving items to a folder without write permissions, the script will prompt you for a password rather than just displaying an error. This is because the script uses the Finder to perform the move. However, this behavior in LaunchBar is supposedly going to be fixed in a future version, so this advantage may only be temporary.

Hope this helps.

-Dennis
Last edited by Dennis on Thu Apr 24, 2008 9:47 pm, edited 1 time in total.

Zippy
Posts: 2
Joined: Thu Apr 24, 2008 8:14 am

Post by Zippy » Thu Apr 24, 2008 9:39 pm

Dennis wrote:Here's a simple script ....

Ha! I gave up AppleScripting when I got very confused!
Still, the script is very much appreciated -Thanks

adman635
Posts: 14
Joined: Thu Mar 13, 2008 4:44 am

Post by adman635 » Sat May 03, 2008 4:23 am

Try this mate:

1. Select objects in finder
2. Hold cmd+space to utilize instant send (it'll say in LB "3 items selected" or whater
3. Press tab and type 'desktop'
4. Press cmd+shift+n (make new folder) and enter a name ("New folder in desktop" should appear)
5. Type a name and hit enter twice. Hit down arrow and enter and you've moved the item.

Just use the shortcut cmd+shift+n after you've navigated to the folder you want a new folder inside. You'll be able to 'store' the items you've instant-sended without needed a shelf or what-not.

Cheers.

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Post by Dennis » Sat May 03, 2008 5:20 am

That does work nicely. It's similar to my suggestion above, but works much better to send the items to LaunchBar first rather than creating the new folder first.

Good one, adman635. Thanks!

-Dennis

Post Reply