Advertisement
C_Volume2 Files #81435

lcfind

This program allows you to find a file or a directory in a specified drive (e.g. your hard disk, a floppy, your cd-rom...). It search for it in all the directories you have in that drive. Click Luke to go to my Web Page: other source code available...

AI

KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Quellcode
original-source
Upload
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main(int argc, char *argv[])
{
 char *instruction;
 if (argc != 3)
 {
 printf("\nUsage is: lcfind drive name\n\n");
 printf(" drive: it is the drive in which you want\n");
 printf("  to search for your file or directory.\n");
 printf(" name : it is the name of the file (or part of\n");
 printf("  the name) or of the directory that you\n");
 printf("  are searching for.\n\n");
 printf("Example: lcfind c lcfind\n");
 return -1;
 }
 instruction = calloc(101, sizeof(char));
 strcat(instruction, "dir ");
 strcat(instruction, argv[1]);
 strcat(instruction, ":\\");
 strcat(instruction, "*");
 strcat(instruction, argv[2]);
 strcat(instruction, "* /s /l /b | more");
 system(instruction);
 return 0;
}
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine