04 December 2008

Copy files to...

I may have missed something but I have yet to find an easy way to copy a set of files to an arbitrary place on my disk.

I think Windows people have this. They right-click on a file and they have a "send to" item so that they can copy the file(s) to any place they want.

I've been playing with Automator recently so I just spent an hour or so to create a "Copy Files To..." Automator application that I also saved as a Finder plug-in.

I've put the application into the File section of the Google group "attached" to this blog. I think you can open it in Automator (I created it on OSX 10.5.5) and use "File > Save As Plugin" to install it as a Finder contextual menu (in which case it will be saved under ~/Library/Workflows/Applications).

The application works like this:

1) You select items in the Finder
2) You call the application, either with Spotlight or with the context menu (bottom item: "More" > "Automator" > "Copy Files To...")
3) You select/create the destination (a folder)
4) The selected files are copied - and are not allowed to overwrite existing files
5) The destination folder opens


It looks like Automator applications are relatively slow to launch so for a small application like that I am not sure this is the best technology...

I am reading a tutorial book to Applescript (Applescript Studioでゼンマイびゅんびゅん!!) and I'm sure I'll be able to write an equivalent thing directly in Applescript in a few days, if work allows for that...

Update

Thank you for the replies on the Google Group and comments here where OnMyCommand, but also Applescript solutions and also, simply, Cmd+C/Cmd+V inside Finder were suggested.

Automator applications, by the way they seem to be implemented, seem to be most useful when they are used a number of times in a row. WHen they are used once in a while, it seems that the time they load into memory (?) kinds of defeat the purpose of creating a simple action.

I still have a hard time figuring out what Automator can be best used for, since obviously, most file management tricks will be executed much faster from the Terminal...

5 comments:

MiGrant said...

Here ya go:

tell application "Finder"
set filelist to selection as list
set curLoc to target of front window as alias
set dest to (choose folder with prompt "Copy items to:" default location curLoc)
duplicate filelist to dest
end tell

Jean-Christophe Helary said...

Thanks Michael for the comment. The script seems to not agree when the destination folder already has files similarly named...

Theo van der Ster said...

In Windows you still have to navigate to the location on your disk to move your files to, and navigating the tree structure in Windows can usually take a while. On the Mac (and I'm a recent convert) you can press Command+N to open a new Finder window, type the name of the new location in the search box and drag the file to its new location. That sounds like less work than on Windows. Also you can move often used locations to the sidebar and just drag your files there.

Jean-Christophe Helary said...

Theo, you can also call "Go To Folder..." in pretty much any Finder related window, including the navigation dialogs. The fields allows for text completion too, so that makes it very easy to go to a location you are familiar with.

Theo van der Ster said...

Look no further -- Quicksilver can do this, and much more. I just started playing around with it, and already... but do find out for yourself. Plenty of tutorials and movies should get you up and running in no time, and you'll be copying and moving files to your heart's content with just a few keystrokes. For starters, go to http://docs.blacktree.com/quicksilver/what_is_quicksilver