Easily Copy File Contents With ForkLift

I use the ForkLift 3 file manager on my Mac. Part of my job involves copying-and-pasting the contents of various files into web forms. I made a trivial little shell script so ForkLift can help me:


if [ ${#@} -ne 1 ]; then
    echo "Expected exactly 1 filename."
    exit -1

pbcopy < $1

Then I created a new "Tool" called "Contents to Clipboard" that calls the script with the name of the selected file.

/Users/me/bin/copy_contents.sh $SOURCE_SELECTION_PATHS

Now I can select a file, select the Commands > Contents to Clipboard menu, and voila! The file's contents are ready to be pasted into another app.

Related Posts