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!
![]() |
|
|||||||
| 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 ... |
|
|
|
#1 |
|
New Poster
Join Date: Jul 2008
Posts: 1 PC Experience: Very Experienced
|
|
|
|
|
| Advertisement - Register to Remove | |
|
|
|
#2 |
|
Tech Member
![]() ![]() Join Date: Feb 2006
Location: coastal Rhode Island
Posts: 4,633 PC Experience: More Stubborn than any PC
|
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
__________________
Friedrich Nietzsche
Last edited by ih8bills; 07-17-2008 at 09:59 PM. |
|
|
|
|
|
#3 |
|
Tech Support Team
![]() Join Date: Jan 2008
Posts: 2,242 PC Experience: Very Experienced
|
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. |
|
|
|
|
|
#4 |
|
Tech Support Team
![]() Join Date: Feb 2006
Location: Gloucestershire
Posts: 2,723 PC Experience: Experienced
|
At the c:\ prompt enter:
tree /a > folders.txt Open folders.txt - all folders/hierarchy displayed |
|
|
|
![]() |
| 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 | |
|
|




























Linear Mode

