Absolutely, the function is simple... just to see if two directories that should have the same contents changed. Here it goes (hope it indents well):
int checkdir(void) { int i, filesize = 0; FILE *fp, *fp2; system("dir c:\\data\\base1 >c:\\data.dir"); fp = fopen("c:\\data.dir","r"); fp2 = fopen("c:\\dataorig.dir","r"); fseek(fp, 0, SEEK_END); filesize = ftell(fp); fseek(fp2, 0, SEEK_END); if(filesize != ftell(fp2)) filesize = -1; rewind(fp); rewind(fp2); for(i=0;i<filesize;i++) { int file1data = 0, file2data = 0; fread(&file1data,1,1,fp); fread(&file2data,1,1,fp2); if(file1data != file2data) break; } if(i != filesize) return 1; else return 0; fclose(fp); fclose(fp2); remove("c:\\data.dir"); remove("c:\\dataorig.dir"); } } This always returns 1 because the file data.dir gets cut so the compare with dataorig.dir always fails. Thanks!! Marton Arkady V.Belousov wrote: > > Hi! > > 18-Сен-2006 11:21 [EMAIL PROTECTED] (Marton) wrote to > freedos-user@lists.sourceforge.net: > > M> I tried that exact version, when I type "ver" I get "FreeCom version > M> 0.84-pre2 XMS_Swap [Aug 28 2006 00:29:00]"... and the issue still > M> happens....... >>>>> Current FreeCOM deals with "/c" option and redirection fine. >>> "Current" - command.com, available from CVS (92787 bytes, "FreeCom >>> version 0.84-pre2 XMS_Swap [Aug 28 2006 00:29:00]"). I don't know, which >>> edition was included into FreeDOS 1.0 distributive. > > Ok, then may you present test case? If you have source, which not > works, give us this source (and all related files and build batch and make > files), so we may try to reproduce your trouble. Of course, try to > minimize > test case (minimal source, minimal batch files to compile). > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Freedos-user mailing list > Freedos-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-user > > -- View this message in context: http://www.nabble.com/Need-help-...-calling-COMMAND.COM-from-C-tf2281583.html#a6378774 Sent from the FreeDOS - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user