void main(int argc, char *argv[1]) {
if (argc < 2)
readImageDir("./");
else
readImageDir(argv[1]);
}

"test.exe [dir] > out.html"てな感じで。