Using batch files to automate repetitive tasks

Since I have a lot files to archive when I'm done with them, I came up with a bunch of batch files to simplify the process(es) of moving them to the appropriate location(s).

Some examples:

My downloads:
I regularly download several podcasts, so one batch file takes care of any new entries.  In this case, it moves any episodes of This American Life and Doug Stanhope's podcasts to my "unlistened mp3s" folder to be put on my iPod later.

The same batch file also moves any videos I've downloaded to a folder where I can rip the audio, which I often do with YouTube videos of interviews or stand-up comedy.  Note: I have to tag the videos first.  Specifically, interviews get the prefix iii; comedies just get "comedy" attached to them.  These tags are also used when I put them on the iPod because it allows me to make playlists of files of similar type merely scrolling through an alphabetical list.  (Other tags include things like "books" for audiobooks, etc.)

The text of the batch file (which continues to be called batch-move-TAL.bat) reads:
move TAL*.mp3 "c:\working\music"
move doug*.mp3 "c:\working\music"
move iii*.mp3 "c:\my shared folder\mp3"
move comedy*.mp3 "c:\my shared folder\mp3"

Update: I've since just lumped all the commands into one file instead of running it one line at a time like I describe above.

Stuff I've listened to:
batch-move-done.bat - moves all the things that remain in the music sub-folders (after I've deleted files I have listened to and no longer want) to a folder called "done."  From there (i.e., the "done" folder) I run a series of batch files that take all the collected mp3s and file them appropriately.  Since I'm often listening to songs and audiobooks by the same set of artists (e.g., working my way through discographies), it makes it easy to do this over and over.  Specifically:

batch-move-gene.bat - Moves Gene Vincent mp3s to my rockabilly folder.
batch-move-HP Lovecraft.bat - Moves audiobooks of Lovecraft stories to my Halloween folder.
batch-move-TAL.bat - Moves This American Life episodes to their folder.
batch-move-u2.bat - Moves U2 mp3s to the folder where I keep their discography.
batch-move-chicane.bat - Moves Chicane podcasts to the folder where I keep his discography.

Update: Again, putting it all in one file is easier on me, and the computer just zips through the commands that don't find any files to move.

Converted mp3s
As I mentioned above, I often convert videos to mp3s (i.e., I just rip the audio), so I have a file that automatically moves the mp3s to my "unlistened mp3s" folder.  I could probably set up the program to just place the converted files there automatically, but this is just as easy since I don't always want every file moved, so this step allows a pause in the process before moving them all.

Moving files off camera cards, cleaning the card, etc.
This involves multiple batch files for each stage of the process.  I go into much detail on this page.

Similarly, I also use a batch file to manage security camera footage.  The file does the following: 1) pulls the files off the card onto my hard drive, 2) cleans the card, and 3) opens the file converter (Files are in a proprietary format and must be converted to something usable by conventional media players).  Additionally, I have another file that I use for the "clean-up."  It deletes the temp files as well as the converted file.

Copyright 2014, 2015 Ale[x]plorer.

Back to the index