Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a directory (and sub directories) which contains a list of shortcuts (i.e. physical files reside somewhere in other dir). I need to find out which files (or rather shortcuts) in this directory contains a particular word. How do I go about doing it? Any relevant Windows API?

You can use the Find -> Files or Folders...
option. There is a field called "Containing text:" which will search inside the file for the given text. You should be very cautious in identifying which directory it will do the search, because you could get a huge number of false hits.
On other tabs you can also limit your search by dates, file size and file types.

I have tried this already. It works if the physical file is in the directory, but not with shortcuts.
Example: I have a file in C:\test\test.dat which contains the word "October". I create a shortcut of this file as C:\shortcut\TestShortCut. If I try to search "C:\shortcut" for the word October, it is reported as no items found.

Shirley, That is correct. the shortcuts contain no text other than the text used to name the shortcut.
I have been sitting here for over 5 minutes trying the figure the best way to explain organizational skills without assuming or insinuating about your level of skills in this area. So, let's assume that you have little to no organizational skills just for the purpose of the following scenario.
I am presently in a large room.
Scattered about the floor I have over 5,000 files. Each file has a string attached to it that lead to my desk. At the desk end of the string is the name of the file.My wife, God bless her, decided to clean the room. She moved all of my files into the corner of the room. This disconnected all my strings or shortcuts to my files. Now I do not know how to find my files.
To avoid this happening again I built a closet and I have gone out and bought ten filing cabinets to keep in this closet. I placed a label on the closet door called "My Closet" and below that 'Keep Out'.
(Are you still with my long windedness?:)
In the first cabinet I have all the things that run my house such as the Operating manuals for the furnace, the refrigerator, the diswasher, vacuum cleaner and the likes.
The next cabinet has My Personal stuff like Cloths: underwear, socks, Bathroom: floss, deoderant and the likes.
The next cabinet has Fun Stuff like Games: Card games, Board games and Video games.
Another cabinet has miscellaneous documents that did not fit into the other cabinets.
I have six more cabinets for later use.
I tied strings to each of the cabinets so that that they can be quickly pulled out of the closet.So, if I am looking for a new toothbrush then I need not look in the Games cabinet.
My wife says to me "where did do put the toothbrushes", well, I said "Did you look at the strings coming out of the door for it". I continued to state that I thought I had put them in the Bathroom part of the Personal cabinet but if you do not find it there then just look in the My Closet somewhere.
So, amongst the strings coming out of the door my wife looked for "Toothbrush" and did not find it on the strings so she pulled on the "Bathroom" string and did not find it. When she pulled on the "Personal" string there they were behind the socks.
So, if you do not have a string, I mean shortcut called October then you will not find it. Try searching in My Closet, I mean, My Computer because everything is in there.
I have a folder named "Bryan's Stuff" it contains 536 folders containing 3,502 files.
I am suggesting that you spend some time reorganizing your personal files. You might have a folder that is named 2002 and another named 2003 versus a folder with just dated text files.
Additionally, you can use up to 255 characters to name a file. Not that I would suggest using all of them but do use enough of them to describe the file so that you can find it easily. Name the files with one long word broken up by capitol letters such as ElectricOctoberBill2003.txt
I would easily find this file in Shirley\2003\Electric folder.
If I wanted all electric bills I would use Find to search in Shirley\Electric for Electric*.txt.
If I found myself going to the Electric folder a lot then I would create a shortcut to the folder itself.
Ok, so you got a LOT more than you asked for. Sorry about that.
Bryan

Yes, I did get a lot than I asked for. But I really need a technical solution for my client. The files are organised in such a way with a reason, which is not convenient for me to discuss here. I hope someone will be able to provide me with the solution.

Shirley, These files that contain the word you are looking for such as 'October' must have some type of organizational structure to them.
Using Win+F will bring up the Find dialog box. Browse to the highest level that anyone of these files could be located in and then search for all that is in this directory.
If this highest directory is C:\ then it will not be of much use.When the search is complete then go to File, Save Search and a shortcut will be placed on the desktop.
The shortcut can then be used to be a little more specific for an individual search by using the Containing text field as suggested earlier.
I do not believe there is an API as you would like but who knows, perhaps someone more knowledgable will come along.
Bryan

![]() |
Outdated sysfiles cant in...
|
display won't change reso...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |