Aug 29, '07 07:30:00AM • Contributed by: Lliwynd
I've just written a program -- Drag.app -- that does allow you to drag from Terminal, and it is available for free, with source. It adds a new command (shell script), drag , which is usable from Terminal. When executed, it opens a new window with a file icon that can be dragged as normal. When the drag is complete, the app quits so your desktop isn't cluttered and you can get back to the command line.
The closest I've seen to this before is the open command. If you open the enclosing directory of a file, then it will be displayed in the Finder -- you can find and drag a file from there. That approach has the downside that you'll sometimes get a .DS_Store file, and it can still be hard to find the file you want if the directory has a lot of files in it. My command cuts to the chase and lets you drag the file(s) you want, then gets out of your way.
[robg adds: I tried this, and it worked well. The download includes a compiled Intel Mac version; you'll have to compile your own for PowerPC, and that's left as an exercise to the reader...]
