Findstr on server results in "Specify only /L or /R."

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
mithril28
Posts: 7
Joined: 17 Jan 2018 16:54

Findstr on server results in "Specify only /L or /R."

#1 Post by mithril28 » 17 Jan 2018 17:03

I have been using this line on my machine (Windows 7 Pro version 6.1.7601) with success:

Code: Select all

findstr /vis:%File1%  %File2%  >> %LogFile%:
This copies all the lines where there is no match between the two files into the log file.
But when I loaded it on the Windows Server 2008 R2 Standard server (version 6.1.7601) and ran the batch file I got the following:
FINDSTR: /: ignored
FINDSTR: /: ignored
FINDSTR: /\ ignored
FINDSTR: /A ignored
FINDSTR: /c ignored
FINDSTR: /h ignored
FINDSTR: /d ignored
FINDSTR: /D ignored
FINDSTR: /a ignored
FINDSTR: /t ignored
FINDSTR: /a ignored
FINDSTR: /_ ignored
FINDSTR: /Y ignored
FINDSTR: /a ignored
FINDSTR: /f ignored
FINDSTR: /f ignored
FINDSTR: /\ ignored
FINDSTR: /H ignored
FINDSTR: /F ignored
FINDSTR: /\ ignored
FINDSTR: /C ignored
FINDSTR: /D ignored
FINDSTR: /T ignored
FINDSTR: /W ignored
FINDSTR: /_ ignored
FINDSTR: /a ignored
FINDSTR: /t ignored
FINDSTR: /. ignored
FINDSTR: /c ignored
Specify only /L or /R.

I've messed around with it but nothing I do helps, and I can't find anything on any of the forums. Has anyone else seen this? Thank you!

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Findstr on server results in "Specify only /L or /R."

#2 Post by aGerman » 18 Jan 2018 01:25

mithril28 wrote:
17 Jan 2018 17:03
This copies all the lines where there is no match between the two files into the log file.
I don't think so. This is not the way options /v /i and /s work. I assume /s was a typo and should rather be /g.

Steffen

mithril28
Posts: 7
Joined: 17 Jan 2018 16:54

Re: Findstr on server results in "Specify only /L or /R."

#3 Post by mithril28 » 18 Jan 2018 08:34

You were right, I wasn't doing it correctly before. I switched it to /V /G and it works correctly on both platforms now, thank you!

Post Reply