6
Contributors
8
Replies
39
Views
4 Months
Discussion Span
Last Post by MadDogMark
0

For me I've use the DIR command to find a file I misfiled. For some, "Everything" (an app you find with google) is the cat's meow.

2

Definitely Everyrhing. Dir will find files but it is slow and not flexible. For example, try to find files with three particular strings but in any order. You'd have to do something like (using my files)

dir /s /b | grep -i adam | grep -i andrew | grep -i shebandowan

That will give me a list of all files containing the strings shown. Now I have al-most 88,000 files on my laptop so it takes some time to traverse the directory. On the other hand, I can bring up Everything and type the three strings in the search bar and it narrows the results list immediately while I type. I can also set the filter to show only picture files. If I press ALT-P then a preview panel is shown (like in Explorer) where I can preview the pictures by selecting them from the file list. Or I can display the results as icons (any size by using CTRL-Scroll). You can't do any of that with dir.

By the way, Everything is free (and it supports complex searches, even with regular expressions).

Edited by Reverend Jim

0

Save the script below as Mysearch.bat then execute it .

::Search through current directory with prompt
:top
@echo off
cls
set a=
set /p a=Enter search string : 
dir /s  %a%*
goto top

Edited by Michael_67: Updated Code as a code

1

Seems a lot less convenient than just typing

dir /s something*

and it only finds strings at the start of a file name. You'd either have to edit it to modify the type of search or create (and remember) multiple search command files.

0

I see DIR getting a little bashing here so if I need speed I can do the DIR \ /s/b > dirtext.txt and then use search commands on the dirtext.txt file.

Yes that text file can get stale but you want speed, so there is a way to do this.

Edited by rproffitt: Spelling

0

I use dir frequently, however, dir must traverse whatever tree you are searching in order to give results whereas Everything maintains a (small) database (updated in real time by a service module) of all the files on the system (with the exception of folders specifically excluded in the user preferences). This can include removeable drives. If you have multiple drives and/or partitions, dir becomes unwieldy. I'm not bashing it. I have a car and a bike. Each is useful but I wouldn't use a bike to get to the cottage any more than I'd use the car to go to the corner store (bad weather notwithstanding).

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.