Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 1.59 KB

File metadata and controls

58 lines (37 loc) · 1.59 KB

Here’s a README.md generated based on the FileSearchRecursive.cpp file:


File Search Recursive System

This project is a File Search Recursive System built in C++. It allows users to recursively search for files within a directory based on specified search criteria.

Files

1. FileSearchRecursive.cpp

This C++ source file contains the implementation of the recursive file search. The program performs the following tasks:

  • Scans directories and subdirectories.
  • Finds files based on user-defined criteria (e.g., file name or extension).
  • Displays the matching file paths.

How to Compile

To compile the project, use the following command in your terminal:

g++ -o file_search FileSearchRecursive.cpp

This will create an executable file named file_search.

How to Run

After compiling, run the program with the following command:

./file_search [directory_path] [search_pattern]
  • directory_path: The path of the directory to search in.
  • search_pattern: The pattern to search for (e.g., *.txt to find all text files).

Example:

./file_search /home/user/Documents *.cpp

This command will recursively search for all .cpp files in the Documents directory.

Dependencies

  • A C++ compiler (e.g., g++).
  • A file system with directories and files to search through.

Future Enhancements

Potential improvements include:

  • Adding support for more advanced search filters (e.g., file size, date modified).
  • Improving error handling for invalid directories or inaccessible files.
  • Providing an option for case-insensitive searches.