Question: Write a c program command line program (in Windows) to find names of files and directories that match a specified pattern. 1. The program must
Write a c program command line program (in Windows) to find names of files and directories that match a specified pattern.
1. The program must be called walker.exe.
2. The program must take two command line arguments one for the starting directory, and the other as a regular expression describing the pattern that must be matched by the name of the directory or file.
3. The output of the program should display all the directory and file names that match the search expression.
a. If there is nothing that matched, you should state, No file or directory found.
b. For each directory found, display the full directory path, each on a separate line.
c. For each file found, display the full file path, each on a separate line.
4. To walk the directory structure, a recursive algorithm must be used.
Should be written in C or C++.
WRITTEN FOR WINDOWS, NO DOWNLOADED LIBRARIES MAY BE USED INCLUDING dirent.h
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
