16,472
社区成员
发帖
与我相关
我的任务
分享
WCHAR buffer[BUFSIZ] = {0};
LPWSTR lpPart[BUFSIZ]={0};
// Retrieve a full path name for a file. The file does not need to
// exist.
GetFullPathName(_T("Big5.dat"),
BUFSIZ,
buffer,
lpPart);
#include <stdio.h>
#include <stdlib.h>
char cmdstr[1024];
char d;
char fn[256];
int main() {
printf("Enter a filename:");fflush(stdout);
scanf("%[^\n]",fn);
sprintf(cmdstr,"dir /b /a-d /s \"%c:\\%s\" >d:\\filesinall.txt",'c',fn);
system(cmdstr);
for (d='d';d<='z';d++) {
sprintf(cmdstr,"dir /b /a-d /s \"%c:\\%s\" >>d:\\filesinall.txt",d,fn);
system(cmdstr);
}
system("type d:\\filesinall.txt");
return 0;
}