Is it possible that the second file might be encoded using UTF-16, in which case findstr won't work with it? Instead, you could try "find" which appears to detect the presence/absence of "Mode=", or findtsr using regex also appears to work on UTF-16 files (with awkward string input & output!) .