How to list/detect all files in the folder?

April 11, 2010 at 11:47:37
Specs: Windows XP SP2
Hi, I would like to know how to make a batch file that detects everything in its folder, and then lists them.

This is what I want it to look like :

------------
Detected files/folders :

Data base
Program Files
Windows
Notes.txt
userbar211.png
yserver.txt
Thumbs.db

Total Files : 7
------------

The main thing I want to know is how to show the "Total Files", the list isn't necessary, but it would be great with it.


See More: How to list/detect all files in the folder?

Report •


#1
April 11, 2010 at 12:43:33
You first say "files/folders", then you say "Files"

What is it, files and folders, or only files ?


Report •

#2
April 11, 2010 at 12:52:46
If it is possible then both, else just files.

Edited:

Pfft, never mind.

I made something similar to what I wanted using this :

@echo off
dir
pause

Thanks anyway.

Edited:

Almost exactly what I want :

@echo off
echo ------------
echo Detected files/folders :
echo.
dir /a /b
echo.
echo ------------
pause

How do I make it show the amount of files? (Without removing the /b in the dir cmd line)


Report •

Related Solutions


Ask Question