Re: partial file name string search

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Rob Stow (rob.stow_at_sasktel.net)
Date: 08/26/04


Date: Thu, 26 Aug 2004 01:31:04 -0600

Chris wrote:

> When I first looked at this I thought it would be very simple and
> everyone would have done it before, but either I'm totally lost or
> something, because I'm really struggeling to find anything that looks
> useful.
> What I'm trying to do is create a little app, (preferably .cmd, or
> .vbs), which I can sit on a remote server, and anyone can run it, it
> will (eventually) ask the user for a string, which should be part of a
> filename, (any part, could even be in the middle of the filename). The
> app should then return a list of the files, (they will be employee
> photos), which they can click on to view. Well that's all the
> background. My real problem at the moment is that I can't find any
> easy way, even using a doss driven exe which takes a partial string
> and returns matching file names. They all seem to return strings
> inside the files, which is NOT what I want. If anyone knows of a good
> doss app, or has a bit of code to get me started that would be greatly
> appreciated, I've spent a fair bit of time going over this, and it's
> not as simple as I initially thought.
> Thanks
> Chris

S'matter of fact, many years ago I got tired of typing
    dir *sometext*.* /s
at a command prompt when I want to list file names
containing "sometext", so I use a very simple little
cmd file "d.cmd" that lets me simply type
    d sometext

The only line in d.cmd is
    dir *%1*.* /s

Type "dir /?" at a command prompt for more info
on using the dir command.

You can also use the search feature built into Explorer.
There are also third party alternatives to Explorer that
have much more powerful search capabilities.



Relevant Pages

  • Re: simple binding of controls to object properties - refresh cont
    ... Thanks again Chris for looking into this.! ... Still I think I prefer just manually reseting the bindings, ... public string Ting ... textbox BobTheBound = new TextBox; ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Security help????
    ... Chris again re my help above. ... all except one Excel file that will open excel, ... No keyboard short cuts work ie to open explorer. ... I thought all the problems were to do with the security ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Security help????
    ... Chris again re my help above. ... all except one Excel file that will open excel, ... No keyboard short cuts work ie to open explorer. ... I thought all the problems were to do with the security ...
    (microsoft.public.windowsxp.security_admin)
  • Re: new for regular expression in Perl
    ... > string, the original file will not change.) ... >> Thanks Chris and others for the information. ... DSL? ...
    (perl.beginners)
  • Re: Programmers unpaid overtime.
    ... > problem in this reasoning, ... > Chris Sonnack presented some interesting numbers. ... Over and above the individual cache for a string ... > a PowerString instance and its string. ...
    (comp.programming)