Category : C Source Code
Archive   : JAZLIB.ZIP
Filename : JZFIND.DMO

 
Output of file : JZFIND.DMO contained in archive : JAZLIB.ZIP
/*
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Title : JZFIND ³
³ Purpose : Search through the entire disk, including all subdirectories ³
³ for a file specified by the user. ³
³ ³
³ Usage: JZFIND ³
³ ³
³ Written by Jack Zucker - 75766,1336 301-794-5950 on 1/28/86 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
*/

#include

char startdir[100];
char filename[100];
int FOUND = 0;

main(argc,argv)
int argc;
char **argv;
{

printf("\nJZFIND (C) JazSoft by Jack A. Zucker (301) 794-5950 | 75766,1336");

if (argc != 2) {
printf("\nUsage: JZFIND \n");
exit(1);
}

strcpy(filename,strupr(*++argv)); /* get filename in global variable */
strcpy(startdir,""); /* start out with the root direct */

searchdir(startdir); /* start recursin' */

if ( ! FOUND ) printf("\n\nNo files were found matching %s",filename);

}

searchdir(fspec)
char *fspec;
#define SUBDIR 0x10 /* attribute for sub directory */
#define NORMAL 0x20 /* attribute for normal direct */
{
int werr;
TDIR wdir; /* hold the dos error number */
int w; /* work variable */
char path[100],temp[100]; /* work STRING variables */

strcpy(path,fspec); /* copy new file spec to work string */
strcat(path,"\\*.*"); /* put /*.* after it */

/* get subdirs and normal files */
werr = jzfndfst(path,NORMAL | SUBDIR,&wdir);

if (! werr ) /* we found at least one match */
do {
if (wdir.attr == SUBDIR && wdir.name[0] != '.') {
strcpy(path,fspec);
strcat(path,"\\");
strcat(path,wdir.name); /* append the new subdir */
searchdir(path); /* recurse against the new file spec */
}

if (jzwldcrd(wdir.name,filename)) { /* file matches user specs */
FOUND = 1; /* we found at least one match */
strcpy(temp,fspec); /* parse out the path */
printf("\n%s found in %s",wdir.name,*temp ? temp : "\\");
}

werr = jzfndnxt(&wdir); /* get the next directory item */
} while (! werr); /* loop until no more files */
}


  3 Responses to “Category : C Source Code
Archive   : JAZLIB.ZIP
Filename : JZFIND.DMO

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/