LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 07-01-2013, 03:52 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-15 with Cinnamon & KDE
Posts: 1,362
Blog Entries: 3

Rep: Reputation: 86
seeking tool to help with file download placement


I go to the web looking for all sorts of information. Yes, I also look for music and images and videos. I'm looking for some sort of utility or browser extension that will help me sort out all of these downloads.

The tool might work like this:
  1. I request a download of some file, say mumble.pdf
  2. The mime type, coupled with the file extension, tell the utility what sort of file I'm grabbing.
  3. While I sometimes get the options to SaveHere when I request a download, usually the files end up in the default download folder.
  4. Instead, I'd like to tool to see that I'm grabbing a PDF, and download into my designated book-reader shelf folder.

Someone suggested that I run a daemon process to watch the default download folder, notice there are new contents, then move those contents to where they belong. I tried a 'cron job' but there was so much delay waiting for things to move. I don't want some process polling the download folder. Perhaps if there is some way to learn that files were written into a folder and start the crank then.

Thanks in advance,
~~~ 8d;-/ Dan
 
Old 07-02-2013, 03:44 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Although it might be possible to do so I do think your described approach makes it harder then expected/needed. One of the first problems that comes to mind; If this tools runs on a regular base, it needs to make sure that the downloads are finished before moving them to a specific destination.

Why not simplify things and create a (shell) script that can do this job for you and run it whenever you feel like it and the system isn't downloading.

This approach will also make sure that it isn't paired with a specific program (browser, (s)ftp, scp, wget, etc...), it will look in one (or more) specified directories.

You might go as far as to run this script at boot.

Just my 2c.
 
1 members found this post helpful.
Old 07-02-2013, 04:14 AM   #3
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,223

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
For Firefox you can use Download Sort extension. But external script, like druuna said, would be better - it not works only with Firefox. This approach has advantage when you want to skip moving big files between partitions.
 
1 members found this post helpful.
Old 07-03-2013, 01:14 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949
I think a script that you could call on to "open" the download files directly from the browser, instead of the default mime-type option, would be even better.

I'm not completely sure about how to go about this at the moment, but I believe that browsers generally just save the file to /tmp or someplace similar, and pass that file location on to the program. So the script would probably just need to read the filename, analyze its type, and move it to the proper preset location.
 
1 members found this post helpful.
Old 07-03-2013, 03:43 PM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-15 with Cinnamon & KDE
Posts: 1,362
Blog Entries: 3

Original Poster
Rep: Reputation: 86
Quote:
Originally Posted by David the H. View Post
I think a script that you could call on to "open" the download files directly from the browser, instead of the default mime-type option, would be even better.
Agreed that a browser extension (or "plug-in" or "add-on" or whatever) makes a lot of sense. Primarily because most download activities are a direct result of browser activities. If I'm doing something else, 'wget' or similar already lets me steer the placement of the fetched file artifacts.

Quote:
Originally Posted by David the H. View Post
I'm not completely sure about how to go about this at the moment, but I believe that browsers generally just save the file to /tmp or someplace similar, and pass that file location on to the program.
Every browser that I work with, including Android based browsers, have configuration of a default download folder. I've not discovered the why or how, but on occasion, I get a dialog that asks "where to save" the file artifacts during the download. I don't recall doing anything unusual to provoke this dialog or else I would use it routinely.

Quote:
Originally Posted by David the H. View Post
So the script would probably just need to read the filename, analyze its type, and move it to the proper preset location.
I started a parallel thread Seeking Help With Script Writing to discuss the coding in detail. In short, there are two parts to a solution
  1. scan the download folder and move files to their destination
  2. discover when there is work to do and launch the scan
Please join us over there.

Cordialement,
~~~ 0;-Dan
 
  


Reply

Tags
cron, daemon, download, file type


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seeking for simple tool that colors text passed through pipe nocif Linux - General 1 08-05-2009 12:14 PM
File Placement policies......... sneha hendre Linux - Kernel 3 09-15-2008 12:29 AM
SEEKING: Realtime, on-screen Apache Monitoring tool. (Even if it's for Windows...) cyryl_the_wolf Linux - Software 4 08-24-2006 11:08 AM
noobie question about file placement PLFaBiaN5 Linux - Software 1 04-02-2006 05:54 AM
suse 9.0 script file placement? rlange Linux - Software 5 01-12-2004 05:24 PM


All times are GMT -5. The time now is 04:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration