Windows Program to automatically move files once ripped

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
Yugatha
Posts: 86
Joined: Fri Jun 08, 2012 1:20 am
Location: The Land Down Under

Windows Program to automatically move files once ripped

Post by Yugatha »

Hi All,

Firstly, it may not be of much use for MakeMKV, but if you use Handbrake as well (or another encoder), it may be of use.

Got a bit bored, and decided to write a folder monitor for handbrake / makemkv. Basically, it monitors an output folder for files with extensions .mkv, .mp4, and .m4v. It scans once a minute for any changes, and if a file is there for more than a minute (with the same file size), it will move it to another folder.

To use it, set a "to monitor" folder (ie, C:\Encoded), and a destination folder (ie, a network drive, or external drive etc). The program will monitor the folder specified as well as all subfolders for files. If the file was created in a subfolder in the "monitor" folder, it will be put in the same subfolder in the destination folder.

Ie, monitoring "C:\Video\Encoded" with a destination "T:\". If a file is created in "C:\Video\Encoded\Popular TV Show\Season 1", it will be moved to "T:\Popular TV Show\Season 1" once Handbrake is finished with it.

Note: It doesn't work with addresses beginning with "\\" (ie, network addresses), but if you map a network drive in my computer pointing to that folder, it works fine.

Source code and pre-compiled executable are included in the download. Note: I tested it on both of my computers, but they were both Win 7 x64. If it doesn't work on your computer, it may need to be recompiled for your pc.

Download from here: https://sites.google.com/a/yugathian.co ... ects=0&d=1

Basic steps of program:
a) Scan folders, read titles and file sizes of all mkv / mp4/ m4v files.
b) Save info in a vector / array / list
c) Sleep for a minute
d) Perform step a again, but compare to existing vector.
e) If file size is the same, move to the new directory
f) If file size is different, update the vector with new file size
g) Repeat c->g indefinitely
Post Reply