How do you get a list of files within a directory so each can be processed?
Or you do this and then read out the test.txt:
#include int main() { system("dir /b > test.txt"); }
The "/b" means just filenames are returned, no further info.