• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

Parsing my drive folder to find a specific file

I need to make a function that will find a specific file in drive C.  I need to parse all folders and subfolders to make sure that I didn't miss anything.  Can anybody share the code that will do this with me?  Thanks.

Example:

My drive C has these structure and I need to find sample.c

C:\
Folder1
   SubFolder 1.1
      SubFolder 1.1.1
      SubFolder 1.1.2
      sample.c
Folder 2
   sample.c
0
rodep
Asked:
rodep
1 Solution
 
agreenCommented:
Whas's your OS ?
0
 
TheMadManiacCommented:
look at the functions findfirst and findnext, they will search through a dir, and give you all info about every file, including directories.



0
 
arunmCommented:
This is fairly easy, open a pipe and execute the command "dir /s c:\sample.c" this will return all files of the type sample.c on a given drive.
0
 
rodepAuthor Commented:
I am using OS/2.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now