Use a thread to monitor a folder.