?
Solved

Batch File search

Posted on 2008-10-09
2
Medium Priority
?
238 Views
Last Modified: 2012-05-05
I want to write a batch file which will search my entire C:\ including subfolders and return me all the file names, their location and the size as a comma seperated output.
0
Comment
Question by:michaelm702
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Expert Comment

by:ddougie
ID: 22684370
You may have more luck looking into scripts for this, because batch files may be a little too primative.  I don't have too much experience with script writing, but the command "dir >> filename.txt" will save the output of your directory as a txt file (though it is not comma seperated, it may be helpful).
0
 
LVL 1

Accepted Solution

by:
benaiah earned 150 total points
ID: 23202042
Why do you need them to be comma separated?

the following code will output all the file names, including full path, one file name per line with no other text.

the file filename.txt will be in the root of the C drive.

I'll get working on how to make them coma separated. Do you mean all on one line with commas separating or each on its own line with a comma at the end of each line?
cd c:
cd \
 
dir /s /b >> filename.txt
 
 
pause

Open in new window

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question