Search found 204 matches

by pieh-ejdsch
17 Apr 2014 11:42
Forum: DOS Batch Forum
Topic: short way to input with xcopy
Replies: 12
Views: 5050

Re: short way to input with xcopy

In your code, for execution is not terminated if not j; n or y n, etc. depending on the language setting is pressed. At a keystroke, the researchers bight could be completed in a subroutine through an exit / b. However, if the option is only an indefinite keystroke to read something, then I use this...
by pieh-ejdsch
15 Apr 2014 15:10
Forum: DOS Batch Forum
Topic: short way to input with xcopy
Replies: 12
Views: 5050

Re: short way to input with xcopy

@aGerman thank you for that explanation. I can't do that - my bad english So I have competed the code, that the last Token before Input is Autoset. At other language settings for example. @echo off setlocal disabledelayedexpansion :init_token_Keypress for /f "eol=1delims=#" %%d in ('"...
by pieh-ejdsch
14 Apr 2014 13:26
Forum: DOS Batch Forum
Topic: short way to input with xcopy
Replies: 12
Views: 5050

short way to input with xcopy

Hallo, I've seen this in most batches: for /f "delims=" %%A in ('xcopy /w "%~f0" "%~f0" 2^>nul') do ( if not defined key set "key=%%A" ) set "key=!key:~-1!" There is a simpe way to read the first line: The output with file is not promt when use /Q In...
by pieh-ejdsch
23 Mar 2014 10:41
Forum: DOS Batch Forum
Topic: Testing on input
Replies: 13
Views: 2404

Re: Testing on input

another Version @echo off for /f "eol=0 tokens=2,3 delims=(/)" %%a in ('"echo n|xcopy /L/-y %windir%\win.ini %windir%\system.ini"') do ( <nul set/p=Choice %%a %%b ? xcopy /Lpy "%~f0" "%~dp0.xc)*"|findstr /b [1-9] >nul &&echo %%a ||echo %%b ) pause exit...
by pieh-ejdsch
20 Mar 2014 22:25
Forum: DOS Batch Forum
Topic: Testing on input
Replies: 13
Views: 2404

Re: Testing on input

good morning, with using only Set /p you put them into a for /f Loop: you Do not need to check if n/no into for-Loop: then into for-Loop at last "Else goto :false" @echo off :Input for /f delims^= %%i in ('^>con set /p "X=Shuld it be ? give me [Y], [Yes] or [N], [No]: " ^&^&a...
by pieh-ejdsch
12 Mar 2014 05:46
Forum: DOS Batch Forum
Topic: [SOLVED] Batch to Parse tags from .log file
Replies: 12
Views: 7186

Re: [SOLVED] Batch to Parse tags from .log file

To extract text from HTML or XML you can use this simple pure Batchscript http://www.administrator.de/forum/html-dateien-nach-bestimmten-strings-auslesen-und-in-textdatei-speichern-180748.html#comment-733852 @echo off&setlocal pushD "%~dp0" if "%~1" equ "" rd & ...
by pieh-ejdsch
09 Mar 2014 14:18
Forum: DOS Batch Forum
Topic: search file using bat (no user input)
Replies: 7
Views: 1842

Re: search file using bat (no user input)

Within a for /f command you use

Code: Select all

dir /a-d /o-d *.txt

to Set the newest file into Var.
Then you can rename Var.

Phil
by pieh-ejdsch
07 Mar 2014 03:36
Forum: DOS Batch Forum
Topic: some questions
Replies: 14
Views: 2189

Re: some questions

if you in a call - with Parameter %0 you can check this

Code: Select all

:Sub
 rem if not in Sub than not Exit
if "%~0" equ ":Sub" Exit /b


Phil
by pieh-ejdsch
06 Mar 2014 05:11
Forum: DOS Batch Forum
Topic: Asynchronous native batch tee script
Replies: 27
Views: 11907

Re: Asynchronous native batch tee script

Good mornig, you can read Input without using find. Now you can read any comments for Input one key. command with Output Redirect into Logfile. Then the simultan Batch only runs to read this logfile. No Line number only one empty line a time. ::batchTee.bat usage: :: command >logfile |batchTee LogFi...