Simple way to keep your download folder tidy


12 Responses to “Simple way to keep your download folder tidy”

  1. Danny O'Brien says:

    #2 — your script was similar to my script, until it hit files with spaces in their name

    tmpwatch and tmpreaper are both perfect for this job, too.

  2. n says:

    What’s wrong with ‘rm `find . -mtime +7`’?

  3. Andrew W says:

    Mac users can use rmtrash, available from Mac Ports. Instead of deleting of files, it moves them to the trash folder.

    Danny’s script seems a bit like overkill, though.


  4. hijukal says:

    I keep my Desktop free of icons. Everything I download goes onto my Desktop. When you can’t find anything because the thing looks so cluttered you tend to organise (i.e. move for permanent storage or delete) it pretty quick.

  5. Matthew Miller says:

    #2 — because you probably want atime, not mtime. Or at least I do. Except for directories, where atime is useless. Since tmpwatch comes with all Red Hat-family distros (and probably most other Linux flavors as well), I typically do this in my crontab:

    /usr/sbin/tmpwatch –dirmtime 240 ~/tmp

  6. Neko says:

    I’ve been playing with AWN’s “Stacks” applet, which combined with the ‘folder’ backend, sorted by date and set to the “Trasher gui” layout, -might- just replace my current system of, yes, dump everything on ~/Desktop and tidy up when it reaches to my second monitor.

    I’d love a way to automatically identify, collate, and file images which are also cat macros though. I wonder if I could OCR them… *wanders off absentmindedly*

  7. snej says:

    I use the Mac program Hazel for this:
    It lets you set up arbitrary rules for processing items in folders, either at the point they get added or at any later time. Very useful for a variety of things, and very intuitive to use.

    (Yes, I know shell scripting, but I don’t want to have to put on my programmer’s hat and waste ten minutes getting stupid quotes in the right places, when all I wanted to do was clean up my downloads.)

  8. boing_x says:

    why can’t you just sort by date and delete everything more than a certain period old?

  9. LogicalDash says:

    The function this describes seems much too simple for a script. Just save

    @weekly rm -r {your temp folder}

    to a text file, then run

    crontab {the filename}

    in a terminal. You’re done. You don’t get any confirmation stage, but if you want to see what the job would delete, you could also just open the temp folder in your file manager.

  10. LogicalDash says:

    …Except that this will actually delete *everything* in the folder, not just unmodified-in-a-week stuff. Sorry, I misunderstood what the script claimed to do.

  11. proto says:

    Huh? Just buy a bigger disk. By the time your drive is full, it’s time to upgrade. The old one’s probably worn out anyway.

Leave a Reply