10 December 2008

Copy - Paste (not Cut) files

After last week's post I tried using the Finder's copy & paste functions to move files around.

One thing the struck me is that there is not cut function. Well, there is the delete function but you can't copy files and simultaneously delete them from their location.

I discovered the reason this morning...

When you copy a file in Finder, OSX does not seem to burden itself to load all the data in memory. It only seems to register the file location.

So, if you copy the files, delete them now because you could as well do it now instead of having to come back here later, and then try to paste them somewhere, OSX will complain that the files are missing. Indeed, there are in the Trash...

The correct order is thus to copy the files, paste them in their new location, go back to the original location and delete them...

It would seem to me that the smarter way to implement that would be to not remember their actual path, but to put a flag on the files, similar to an alias, so as to track the files if they move or are removed, before being pasted to their new location...

Update

I just found this hint on MaoOSX Hints: Use Quicksilver for Finder cut and paste .

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...