So simple a child could likely code this
January 15, 2010 2:23 PM Subscribe
Using Automator and/or AppleScript to automatically move files of a specified type(s) from one folder to another?
This is likely a basic Automator/AppleScript question, but my Google-fu is failing me, I have yet to use Automator for anything worthwhile, and I haven't asked a question here in a few weeks, so revel in my ignorance!
I would like a workflow that moves all .jpg and .gif files (and ONLY those file types) from my Downloads folder to a folder labeled "Downloaded Images." Ideally, this job should run either automatically as a folder action or periodically as a cron job. In my mind, the way I'd like it to run is that after I download an image to my Downloads folder, the script or action automatically moves that image to a different, pre-specified folder. I don't want to right click and run a job, I want this to work without me telling it to do so on a case-by-case basis. If that's too hard, I could live with this job running on a schedule I set up with Cronnix or similar.
Vie Google, I've seen examples of how to do this for all items in a given folder, and I've seen an example of how to do this while selecting files on the fly, but what I want is a standing rule that says "all files of types x and y are moved to folder z," and just does this with no further intervention on my part.
It's gotta be easy-peasy and I'm over-thinking this, right?
posted by mosk to computers & internet (5 answers total) 1 user marked this as a favorite
#!/bin/sh cp ~/Download/*.{jpg,gif} ~/Downloaded\ Images 2> /dev/nullposted by seliopou at 2:30 PM on January 15, 2010