IDA is not a decompiler. If you happen to have the Hex-Rays decompiler plugin for IDA, then you could probably write an IDA scrip and run IDA in batch mode to accomplish something along the lines of what you are asking.
this is what you need to instruct the hexrays decompiler to batch-process your file(s). you could write an external batch/perl/whatever script to list a path's filenames and pass them over to ida/hexrays.
Note: Registration is required to post to the forums.