Hi
In the command prompt in Windows 8.x, the output of the dir command produces a list of all files and directories with their information.
If I wanted to display only the output of only two or three files (including their information), how should I do?
Note: These files, that I should see, have completely different names.
Thanks
Bye
Find two or more strings in an output
Moderator: DosItHelp
Re: Find two or more strings in an output
Code: Select all
@echo off
set "dir=C:\Test"
set filenames="1.txt" "3.txt" "5.txt"
pushd "%dir%"|| exit/b
dir %filenames%| findstr/brv /c:" " /c:$
popd
pause
Re: Find two or more strings in an output
You can specify multiple files, or file masks with wildcards on a single DIR command.
Dave Benham
Code: Select all
dir file1.txt file2.exe file3.dat
Dave Benham