Monday 23 October 2017

DOS stuff

As you ought to know, in Windows Explorer with nothing selected (right click on a white bit if a file is highlighted) then
Shift RightClick

Now choose this
to open what I still call a DOS box. Type exit to close it.

Now you can use all of your long forgotten DOS commands e.g.

Searching for text within files

findstr /c:yogurt /s *.doc >ans.txt
will find yogurt in all of the doc files, the /s includes sub-directories

Works on proper text files like csv, doc, pdf, txt, xls but not docx or xlsx
Finds exif data in image files but it's not quite exiftool

Wrap multiple words inside "" e.g.
findstr /c:"fresh yogurt" /s *.doc >ans.txt

n.b.the files mustn't be open or you'll get an error


More to come




No comments:

Post a Comment

Note: only a member of this blog may post a comment.