My last post over at my old blog hinted to a new extension. Some of you may have thought that “I already got an idea for a new extension, which Opera’s still lacking an API for atm” addressed Sexy Dialog, but it didn’t (I actually didn’t even plan to develop Sexy Dialog back when I wrote this post).
As the title says, this mysterious extension is called “Download Control”.
What is it about?
Download Control is meant to enhance download handling (Who would have guessed?).
So far, it “only” has two features:
- You can add rules where your downloads are supposed to be saved on a per site or per file type basis.
Therefore, open Download Control’s options page. You’ll then find three sections of rules as well as a field for the default path.
Priority of rules is from top to bottom (first rule that matches determines download location).
What’s the default path for? It’s set in Chrome’s settings, right?
True, but it’s not as easy. Let me explain that to you:
Chrome has limitations to what an extension is allowed to do. One of those is that Download Control can only save files in the default download directory specified in Chrome’s settings and its subdirectories (including the ones it possibly creates for you). To overcome this limitation, you need to set Chrome’s default download folder to include all folders you want to save files in.
I want to save documents in my “Documents”-folder (C:\Users\me\Documents) and the rest in “Downloads” (C:\Users\me\Downloads).
Chrome’s default default download folder (Oh boy! That’s where I lost the last of you guys ^^) is “C:\Users\me\Downloads”. That doesn’t include the “Documents”-folder.
Hence, go to Chrome’s settings and change “C:\Users\me\Downloads” into “C:\Users\me” to include all folders.
To avoid all files that don’t match any rules ending up in “C:\Users\me”, enter “Downloads\” as Download Control’s default path so it gets added if no rule matches.
OK, I got that. Now how do I add rules?
At the bottom you’ll find three input fields:
for casual users: just enter a part of the URL, e.g. “my.opera.com” or “google.com/docs”
for advanced users: it supports regex! So you can also write something like “\d-(zip|miles).(com|org|net)$” (don’t expect this example to make a whole lot of sense :D)
- File type:
just enter one or more file endings (comma separated), e.g. “pdf, doc, docx”
The sub-folder (relative to Chrome’s default download folder as mentioned above) you want to save files matched by this rule, e.g. “Documents\”
Additionally, you can also add variables to the path. At the point of writing, there are two of them “%DOMAIN%” and “%FILETYPE%”. Whenever you use those, they’ll get substituted with the corresponding domain / file type. A possible path could e.g. look like “Documents\%FILETYPE%s\”
Now you’re all set. Add some rules and test it 🙂
- You can specify what to do in case a file with the same name already exists.
This is a lot easier to explain: Click “Settings” on the left menu and choose whatever you want it to do 😉
Sounds cool? Test it!
If you are using Chrome or Opera 20 Dev, you can get Download Control 1.0 alpha here 🙂
As it’s an alpha version, it’s not feature complete yet, so let me know what you’d like to see, what needs to be improved etc. (Some cheering is appreciated, too) 😉