Link to home
Start Free TrialLog in
Avatar of Rob Sanders
Rob Sanders

asked on

How can I search a list of folders?

I want to search a list of folders for files larger than a certain size. Does anyone know of a utility or a way to do this in Windows? I have a bunch of folders underneath one folder that I want to search but I don't want to search all of them. Please let me know if you need any additional info to help. Any help would be greatly appreciated.
Avatar of Adam Brown
Adam Brown
Flag of United States of America image

The attached powershell command will get you want you want.
dir -recurse | where {$_.length -gt <number>}

Open in new window

Hi,

Would this be under w7 or xp?

For info, Powershell comes with Windows 7 (just type powershell at the command prompt) and can be obtained for XP at http://support.microsoft.com/kb/968930
Avatar of rajesh_rhce
rajesh_rhce

go to cmd prompt and chk it dir/? and try it.


and also go to search option in windows and chk through wild card * ?.
simple windows search in xp (and I assume somewhere in win7)

on the left hand side click on "what size is it" and you can select a size
then click on "more advanced options" and select not to search subfolders

now to pick more than one directory, in the folders prompt delimit it by semicolon

c:\mydir1;c:\mydir2
Avatar of Rob Sanders

ASKER

This is in Windows 7. I will give these suggestions a try and post what happens.
Oh, you can also output the results to a text file like this:
dir -recurse | where {$_.length -gt <number>} > c:\textfile.txt

Open in new window

if u double click the search bar in explorer (top right) it should bring down some options including size
tbonejackson--See page 7 and 12 here
http://www.thelongclimb.com/win7powersearch.pdf
for windows 7 - read this

http://windows.microsoft.com/en-US/windows-vista/Find-a-file-or-folder

gives u ways to search - then click To find a file or folder using the Search folder
This all seem like pretty good suggestions. However, to clarify a little more, what I need is to be able to execute a search of a folders subfolders, but I want to only include certain subfolders in the search as opposed to including all of them. Rockiroads suggestion is pretty close to what I want to do, but I need to do it in Windows 7.

Also, I am not familiar with running powershell commands so sorry, i might need to be walked through acbrown2010's solution a bit more.
Also, I checked the Windows 7 guide linked by rockiroads and it is close but it doesn't seem to present any options to include/exclude specific sub folders.
Im on a win7 box now. In order not to search subdirectories this is one way I found not to search

go to control panel/folder options and click on search tab

or in explorer, click on Organise and select folder and search options, takes you to folder options
I have not been able to specify multiple directories. crap how they changed something easy and simple to use
so able to set not to search subdirectories as well as size (win7) but just the one thing missing. havent found a way yet
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That did the trick rockiroads. Thank you so much for the help.
no worries
plz
go to cmd mode and

start-> run-> cmd

and where u serch u dir

means which drive  exampl c:,d:, etc

go to than drive prompt

c:\> to d:\>
c:\> d:<-|
syntax is

c:\>dir /o s

o = order
s is size give size of folder and chk it.