0
我在C中拥有这段代码,它每8秒连续执行一个批处理文件。每X秒执行一个目录中的任何X文件
int main()
{
for (;;)
{
system ("start C:\\Execute\\xxx.bat");
Sleep(8000);
}
}
我该怎么办才能执行任何.bat文件?我的意思是,无论我在C:\ Execute中插入的.bat文件必须被执行,直到我删除文件。如果里面什么都没有,那么在我插入另一个.bat文件之前它什么都不会做。
谢谢。
谢谢。我无法用findfirst得到它,有没有另一种方式? – Isdera
@Isdera我会使用opendir()系列(“man opendir”和相应的函数) –