You are not logged in.
Pages: 1
Hi
I have a litte problem using FINDSTR.
In a file TXT there are lines wich start with space characters:
CompanyName = MyCompany
I use FINDSTR for filter CompanyName FINDSTR /c:"CompanyName ="
but i would erase the space character.
Thanks in advance.
Offline
Sorry...
I use FINDSTR for filter CompanyName FINDSTR /c:"CompanyName ="
but i would erase the space character into the FINDSTR risults.
Offline
Findstr cannot erase characters, but batch file can help:
FINDSTR /c:"CompanyName =" "file.txt" |repl "^ *" ""
This code above uses a helper batch file called `repl.bat` (by dbenham) - download from: https://www.dropbox.com/s/qidqwztmetbvklt/repl.bat
Place `repl.bat` in the same folder as the batch file or in a folder that is on the path.
Offline
Thanks a lot
Works perfectly.
Offline
Pages: 1