Page 1 of 1
How to usee type and find instead of echo
Posted: 07 May 2017 02:27
by Zia-ur-Rehman
Can som one tell me how this works
Code: Select all
Type %0 | Find " " | Find "A Z" >> C:\example.text
:output
Heloo
How r u
Exit /b
Re: How to usee type and find instead of echo
Posted: 07 May 2017 04:50
by penpen
What result do you get?
What is the name of the batch file? (Example: "batch file.cmd".)
How do you call it? (Per doubleclick or do you use the cmd shell; in last case please with the full copy pasted screen.)
Or might i misunderstand what you are writing, and you only want to know a way to do output in a batch file?
Sidenote: Please use
[code]sample code[/code] tags:
penpen
Re: How to usee type and find instead of echo
Posted: 07 May 2017 10:52
by aGerman
I guess you want to do something like that:
Code: Select all
@echo off
:: FINDSTR is searching for (at least) four spaces at the beginning of the line in this script file. The output will be redirected to "example.txt".
findstr /bc:" " "%~f0" >"example.txt"
:: EXIT /B quits the batch execution. Following lines were never seen by the command interpreter.
exit /b
Hello
How r u
Steffen