将DOS文件批量复制到UNIX系统的小程序 江苏 李景波 1996-09-13 /*doscpall.c*/ #Include main(int argc,char **argv) { char s[80],cmd[80],*path; FILE * fp; if(argc!=3) { printf("Usage:doscpall device:path device:path\n"); exit(1); } sprintf(cmd,"dos|s %s>TMP",argv[1]); system(cmd); fp=fopen("TMP","r"); while (fscanf(fp,"%s",s) !=EOF) { puts(s); sprintf(cmd,"doscp %s%s %s",argv[1],s,argv[2]); system(cmd); } fclose(fp); unlink("TMP");