fixed batching issues with nested folders

Still issues with folders having spaces in names