Search code examples
batch-filefindstr

Batch findstr error


I am trying to make a Database of how much I paid for Items, so I can quickly find it when selling them again. I now have a batch file that automatically stores the Item name, and for how much I bought it. (works fine) Now I wanted to make another batch file where I can enter a name of an item and have it tell me if I have it is in my database, and how much I paid for it. I just messed around with the findstr command, and this was created (i know its bad :D). But it always says: FINDSTR:searchterm can not be opened. Any Ideas?

@echo off

:start

set /p item=Item you want to look up: 
findstr /I / X "%item%" log.txt > logoutput.txt


goto start

pause

Solution

  • There is an space between the slash and the X (/ X) that should not be present.