Automate batchfile generation for sFTP

Hey all,

I am writing a script for sFTP using batchfile option \(-B\). My script is supposed to monitor a certain directory for several files and when they are found I will send them to a testing server. So using a static batchfile wouldn't be feasible, I am just wondering if anyone can show me how to dynamically generate the batchfile \(which I assume is simply a text file\) when the file is found, then I can use it to invoke sFTP. Thanks