Folder Action to Save Opened Files in Opera 9
Originally posted on Sunday, June 04, 2006
“I read about Temporary Downloads in Opera9...I’m a Mac user and I want to protect all my documents, how can I do that?”
Answer: Using a Folder Action, you can automatically move files from your Temporary Downloads folder to your default downloads folder.
Wow, you rock! This is probably flawless, bugless, and covered by some sort of guarantee, right?
Heck no. It comes with no promises, no warranty, no suitablity for any purpose expressed or implied.... Caveat any- and every-thing. All I’ll say is that it works for me, and should work for you. Use at your own risk, your mileage may vary, do not taunt Happy Fun Ball.
NOTE: This script is designed to run on Mac OS X which has a non-standard 'mv' command with a '-n' flag which will refuse to overwrite an existing file.
It has been tested under 10.4.6 and MacOpera build 3447 (which is Opera 9.0 Final. See opera:about to verify your version
Note that MacOpera 9 fixes one previous annoyance which was the use of an odd character in the default cache path, which used to look like this: ~/Library/Caches/Opera Cache/Cache ƒ. That wreaked havoc with shell scripts. Good riddance.
Warning: If the Temporary Downloads folder itself is deleted, I expect that the Folder Action will be disabled, even if the folder is re-created. You will need to repeat these steps (at least some of them). However, the folder itself is not deleted even when the cache is emptied.
How do I use this?
Step 1: Open /Applications/AppleScript/Script Editor.app and paste in this code:
on adding folder items to this_folder after receiving added_items
do shell script "/usr/local/bin/save-opened-opera-files.sh"
end adding folder items to
Note that we will be creating /usr/local/bin/save-opened-opera-files.sh below and you can call that file whatever you want.
Step 2: Save the Script Editor file to /Library/Scripts/Folder Action Scripts/. (You don’t have to save it there, strictly speaking, but it does make it easier in certain circumstances.) I called mine “SaveTempDownloads.scpt”
Step 3: Open the Temporary Downloads folder. This is in ~/Library/Caches/Opera/Temporary Downloads/ and Right/Control Click onto the folder and choose “Enable Folder Actions” if it isn’t already.
Step 4: Right/Control Click on the Temporary Downloads folder and choose “Attach a Folder Action”
Step 5: Choose the Folder Action Script, and select the file you saved in Step 2 above (“SaveTempDownloads.scpt” in my example)
Step 6: Save save-opened-opera-files.sh.zip to your Desktop, then issue these three commands in Terminal.app:
- unzip ~/Desktop/save-opened-opera-files.sh.zip
- chmod 755 ~/Desktop/save-opened-opera-files.sh
- sudo mv -i ~/Desktop/save-opened-opera-files.sh /usr/local/bin/
Note that you will have to enter your administrator password to use sudo
Step 7: After all the steps, simply Open a file in Opera and see where it ends up. If it is in your Temporary Downloads folder, you know something went wrong.
Comments
On June 05, 2006 at 01:29 PM, eblade
wrote:
Wow, this new "login" system sucks.
In opera:config, you can set the directory that files are downloaded to when you click "Open" .. independently.
At least, as of an update or two ago.
On June 05, 2006 at 03:07 PM, TjL (tntluoma.com)
wrote:
@eblade: well what really sucks is the spammers who send hundreds of junk comments that I have to go through and manually delete. Every. Single. Day. 7 days a week. 52 weeks a year.
Until those bottom feeders are eliminated from the universe, I will not be wasting any more time with them. Yes they can create TypeKey accounts, but so far I have only had one do that, and they were immediately dealt with.
Sorry, but it was taking up way too much time to deal with the comment spam, even on a niche site like this one, they are just relentless.
Yes, in recent versions of Opera you can set this using
On June 10, 2006 at 12:36 PM, drdrew
wrote:
Sweet!!!
Drew Olanoff
Best Damn Tech Show, Period.
http://www.BestDamnTech.com
http://www.SoFastItSings.com
Post a comment
Thanks for signing in, . Now you can comment. (sign out)
(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)
On June 05, 2006 at 11:44 AM, FataL
wrote:
I love "save and than open" feature too...
To bad that they change good and obvious behavior to something else.
The thing that I only miss in Opera 8 is contextual menu command to resave previously opened file to different location on my HDD.