请教这段程序怎么编
请问这段程序如何编?
搜索D:\FILE\AA,
如AA文件夹存在,输出“D:\FILE\AA存在”,
否则输出“D:\FILE\AA不存在”。
注意搜索的是文件夹。
希望帮忙
------解决方案--------------------
#include <stdio.h>
#include <stdlib.h>
int main(){
int code;
system( "echo off ");
code=system( "cd D:\\FILE\\AA ");
if(code){
printf( "The directory is not exist! ");
exit(0);
}
printf( "This directory is exist! ");
system( "pause ");
return 0;
}
搜索D:\FILE\AA,
如AA文件夹存在,输出“D:\FILE\AA存在”,
否则输出“D:\FILE\AA不存在”。
注意搜索的是文件夹。
希望帮忙
------解决方案--------------------
#include <stdio.h>
#include <stdlib.h>
int main(){
int code;
system( "echo off ");
code=system( "cd D:\\FILE\\AA ");
if(code){
printf( "The directory is not exist! ");
exit(0);
}
printf( "This directory is exist! ");
system( "pause ");
return 0;
}