Page 1 of 1

searching with dir

Posted: 17 Sep 2009 09:09
by alcool9999
hi
i need to get the names of all the files in a folder and all the files inside subfolders.
i want just the name of the files and not the path and i dont want it to list the sub folders just the files inside.

any help apreciated.
thanks

Posted: 17 Sep 2009 09:22
by avery_larry

Code: Select all

@echo off
set "rootdir=c:\your root folder"
cd /d "%rootdir%"
for /r %%a in (*) do dir /b /a-d "%%~a"