File searching all over hard drive 
Author Message
 File searching all over hard drive

    What is a easy way of searching for a file in TP 7? I want to be able to
search in all the directories and the root also. Any ideas?

Thanks

Sheldon
P.S. Please E-Mail me your ideas.



Wed, 18 Jun 1902 08:00:00 GMT  
 File searching all over hard drive

|
|    What is a easy way of searching for a file in TP 7? I want to be able
to
|search in all the directories and the root also. Any ideas?
|
|
|Thanks
|
|Sheldon
|P.S. Please E-Mail me your ideas.
|
|

You need a recursive procedure to search all the directory. I've done this
to do a prog. that do like dir /s but with the acurate total (not like dir
who don't count hiden file). Unfortunatly I deleted the source! But I can
tell you that it's quite easy to do!



Wed, 18 Jun 1902 08:00:00 GMT  
 File searching all over hard drive

:     What is a easy way of searching for a file in TP 7? I want to be able to
: search in all the directories and the root also. Any ideas?

There are two instrucions in TP: FindFirst and FindNext. Just type any of
these in your source and press CTRL-F1 for detailed informations.

regards,
Michal Urbanczyk
(Lublin, Poland)



Wed, 18 Jun 1902 08:00:00 GMT  
 File searching all over hard drive


23:29:04 in comp.lang.Pascal.borland, Sheldon Marchand

Quote:

>    What is a easy way of searching for a file in TP 7? I want to be able to
>search in all the directories and the root also. Any ideas?

>Thanks

>Sheldon
>P.S. Please E-Mail me your ideas.

QHAH.  SigSep.  TSFAQP #12.
Consider http://www.merlyn.demon.co.uk/programs/listdirs.pas

--

  Web URL: http://www.merlyn.demon.co.uk/ - FAQqish topics, acronyms and links.
  Correct 4-line sig separator is as above, a line comprising "-- " (SoRFC1036)
  Before a reply, quote with ">" / "> ", known to good news readers (SoRFC1036)



Wed, 18 Jun 1902 08:00:00 GMT  
 File searching all over hard drive

What you have to do using FindFirst and FindNext is recursively check
the attributes for sub directories so that you can then cd to them and
start your check again (hence recursively)...

Quote:


> :     What is a easy way of searching for a file in TP 7? I want to be
> able to
> : search in all the directories and the root also. Any ideas?

> There are two instrucions in TP: FindFirst and FindNext. Just type any
> of
> these in your source and press CTRL-F1 for detailed informations.

> regards,
> Michal Urbanczyk
> (Lublin, Poland)



Wed, 18 Jun 1902 08:00:00 GMT  
 File searching all over hard drive

Quote:

> What is a easy way of searching for a file in TP 7? I want to be able
> to|search in all the directories and the root also.

> You need a recursive procedure to search all the directory.

Ugh! Recursion! What if you need to find 2 such files on your hard disc? Or
maybe all *.pas files? A better solution is to store information on the heap
(not forgetting to free it when you've finished, of course) so that you can
resume a search from where you left off.

Chris.



Wed, 18 Jun 1902 08:00:00 GMT  
 File searching all over hard drive

On Sun, 30 Nov 1997 01:43:35 GMT, Chris Rankin

Quote:


>> What is a easy way of searching for a file in TP 7? I want to be able
>> to|search in all the directories and the root also.


>> You need a recursive procedure to search all the directory.

>Ugh! Recursion! What if you need to find 2 such files on your hard disc? Or
>maybe all *.pas files? A better solution is to store information on the heap
>(not forgetting to free it when you've finished, of course) so that you can
>resume a search from where you left off.

>Chris.

What's so bad about recursion?

Even Neil Rubenking uses it <g>

{ see if you can find Neil's unit FILESRCH.PAS }
{ It will do exactly what you want.  Try the AllSearcher() function }
{ I'd post it here but that is not allowed }



Wed, 18 Jun 1902 08:00:00 GMT  
 File searching all over hard drive

Quote:

>>> You need a recursive procedure to search all the directory.

>>Ugh! Recursion! What if you need to find 2 such files on your hard disc? Or
>>maybe all *.pas files? A better solution is to store information on the heap
>>(not forgetting to free it when you've finished, of course) so that you can
>>resume a search from where you left off.

>>Chris.

>What's so bad about recursion?
>Even Neil Rubenking uses it <g>
>{ see if you can find Neil's unit FILESRCH.PAS }
>{ It will do exactly what you want.  Try the AllSearcher() function }
>{ I'd post it here but that is not allowed }

I have written a all-file searcher in pascal. Write me if you want it.
You can specify a starting point and file mask (e.g: 'C:\DOS\*.Exe'
would start in the DOS directory on c:\, and search it all subdirs for
*.exe files.)


Wed, 18 Jun 1902 08:00:00 GMT  
 File searching all over hard drive



Quote:
>I have written a all-file searcher in pascal. Write me if you want it.
>You can specify a starting point and file mask (e.g: 'C:\DOS\*.Exe'
>would start in the DOS directory on c:\, and search it all subdirs for
>*.exe files.)

http://www.merlyn.demon.co.uk/programs/hunt.pas  &  ...exe
will do that; other properties include before/from file date, and
optionally executing a program on what is found.

--

  Web URL: http://www.merlyn.demon.co.uk/ - FAQqish topics, acronyms and links.
  Correct 4-line sig separator is as above, a line comprising "-- " (SoRFC1036)
  Before a reply, quote with ">" / "> ", known to good news readers (SoRFC1036)



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. File searching all over hard drive

2. Display Free Hard Disk Size Of SCSI Hard Drive

3. HELP - hard drive sleep

4. Hard Drive Mirror

5. Install to Non-defualt Hard Drives

6. Hard Drive Light Help Needed

7. hard drive serial no.

8. Find Cluster size inn hard drive via Pascal

9. Reading the physical sector of hard drive

10. Hard Drive Serial numbers

11. Hard Drive Serial numbers

12. Get hard drive serial number in protected mode ?

 

 
Powered by phpBB® Forum Software