Batch code to list the contents of a folder

April 16, 2011 at 11:21:04
Specs: Windows XP
I need a batch code to list the contents of a folder. Except I need it to exclude the files file1.bat, file3.bat, and file6.bat. I'm using the code "dir C:\ /B/S/A:-D>list.txt" and I get

file1.bat
file2.bat
file3.bat
file4.bat
file5.bat
file6.bat

but I want it to read

file2.bat
file4.bat
file5.bat

can I have some help.


See More: Batch code to list the contents of a folder

Report •


#1
April 17, 2011 at 00:10:22
dir/b | find /v "file1.bat" | find /v "file3.bat" | find /v "file6.bat" > outfilr


=====================================
Life is too important to be taken seriously.

M2


Report •
Related Solutions


Ask Question