Our November Competition
User Reviews - Add Yours!
The PCHF Lounge
Go Back   PC Help Forum » Operating Systems » Windows XP/2000
Register for a Free Account

Windows XP/2000 - cmd prompt question posted in the Operating Systems forums; Hello. I'm trying to figure out how I can search for folders using command prompt. But it's a little more complicated then just that. I have a huge list of ...


Reply
Scan your PC for Errors
Old 07-17-2008   #1
New Poster
 
Join Date: Jul 2008
Posts: 1
PC Experience: Very Experienced
Default cmd prompt question

Hello. I'm trying to figure out how I can search for folders using command prompt. But it's a little more complicated then just that. I have a huge list of folders in excel. Ex:
C:\folderA
C:\folderB
C:\folderC

and I need to search in just those folders to see if there are folders in them. Basically, is there a command I can use to search for folders in each location? I was thinking I could use excel, with the list of folders i want to search through, then write the command to each folder and paste everything into notepad and save as a bat file. Then have the results go into a text file. This sounds complicated, but any help would be much appriciated.

thanks!
nealkal is offline   Reply With Quote
Advertisement - Register to Remove
Old 07-17-2008   #2
Tech Member
 
ih8bills's Avatar
 
Join Date: Feb 2006
Location: coastal Rhode Island
Posts: 4,633
PC Experience: More Stubborn than any PC
Default Re: cmd prompt question

Hi welcome to PCHF...
Batch files can be a boon...but complex ones can lead to problems.


perhaps some help via Google ?

Windows XP Books Software and Websites
__________________


Without music, life would be a mistake
Friedrich Nietzsche

Last edited by ih8bills; 07-17-2008 at 09:59 PM.
ih8bills is offline   Reply With Quote
Old 07-18-2008   #3
Tech Support Team
 
Join Date: Jan 2008
Posts: 2,242
PC Experience: Very Experienced
Default Re: cmd prompt question

DOS Command to type at command prompt is: dir c:\folder1 /ad/on/b/s >folder1list.txt
The above command will only list folders - not files.

You can also find all folders within certain folders using the builtin Microsoft Search. However I don't think you can save it to a text file. To do this do the following:

Click Start > Search > All Files and Folders
In look in just erase whats written there and put in the locations you want to search for folders in the following format.
c:\folder1;c:\folder2;c:\folder3
In Type of file > scoll through the list and select Folder
If you want to search subfolders as well - make sure there is a tick in Search Subfolders.
Click Search

Otherwise you can get software that will print folder listings.
Comments on this post
GhastMaster agrees: excellent
DIIRE is offline   Reply With Quote
Old 07-18-2008   #4
Tech Support Team
 
elpmek's Avatar
 
Join Date: Feb 2006
Location: Gloucestershire
Posts: 2,723
PC Experience: Experienced
Default Re: cmd prompt question

At the c:\ prompt enter:

tree /a > folders.txt

Open folders.txt - all folders/hierarchy displayed
elpmek is offline   Reply With Quote

Reply


Bookmarks

Tags
answered, Answered:, cmd, prompt, question
Similar discussions...
Thread Thread Starter Forum Replies Last Post
dumb question antoinejones Network Help 3 02-22-2007 09:30 PM
Wierdest MS knowledge base article ever? joe5 The Lounge 5 11-05-2005 02:19 AM
[Fixed] Command prompt Jorviper99 Windows XP/2000 9 08-09-2005 09:36 PM
[Answered]How to restrict users running programs from command prompt biohazard Windows XP/2000 7 07-24-2005 05:18 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On




All times are GMT. The time now is 08:12 AM.
Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2