Find two or more strings in an output

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

April 20th, 2015 6:44am

If I wanted to display only the output of only two or three files (including their information), how should I do?

It would probably be better to learn some PowerShell to do that.  However, cmd window shell could also do it.   E.g. perhaps pipe dir/a/b/s into find or findstr and then (somehow--perhaps a "for /F loop") do a dir or whatever you want on what remained to get "their information".  In contrast with PowerShell the last stage would be a piece of cake:  fl * (or ft -AutoSize) would be enough and you would get more detail on each file.

Good luck

Free Windows Admin Tool Kit Click here and download it now
April 20th, 2015 12:28pm

Hi,

You just add the multiple specific file name to achieve it.

The syntax is like this:

dir [Drive:][Path][FileName] [...] [/p] [/q] [/w] [/d] [/a[[:]attributes]][/o[[:]SortOrder]] [/t[[:]TimeField]] [/s] [/b] [/l] [/n] [/x] [/c] [/4]

You can use multiple filenames. Separate file names with spaces, commas, or semicolons. You can use wildcard characters (that is, ? and *) in FileName to display a group of files(see screenshot below).

April 21st, 2015 3:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics