I needed to watch a directory for incoming files, then rename the files sequentially and move them. Here's how I did it.