adding batch processing of directory