Search found 239 matches

by pieh-ejdsch
18 Oct 2016 14:10
Forum: DOS Batch Forum
Topic: Silly question - why would my script not be writing the last portion to a log file?
Replies: 2
Views: 2377

Re: Silly question - why would my script not be writing the last portion to a log file?

Hi Simms, mainpath and logpath isn't set. 1st you can reduce the varLength DateLog set "DateLog=%date:~-4,4%_%date:~-10,2%%date:~-7,2%" 2nd Use Echo on if you wantto see script at work and Log it. @echo off :: ... set debug=1 :: ... CALL PEMCOA7_FCSTSEQ_ADMIN.cmd PEMCOA7 Admin PEMFIN_FCSTS...
by pieh-ejdsch
14 Sep 2016 11:07
Forum: DOS Batch Forum
Topic: Third module to a batch file
Replies: 6
Views: 5541

Re: Third module to a batch file

use an empty Folder and robocopy. @echo off setlocal set "T=%temp%\DF%time::=%" md "%T%" ||exit /b 1 PushD "%T%" :List rem Delim=TAB rem minage - not before for /f "tokens=3 delims= " %%D in ( 'robocopy /L /fp /np /njh /njs /mir "m:\global\pix\pix" &...
by pieh-ejdsch
01 Sep 2016 10:56
Forum: DOS Batch Forum
Topic: The topic is to reach a value, in a batch file with only one setted variable
Replies: 26
Views: 20141

Re: The topic is to reach a value, in a batch file with only one setted variable

I didn't understand your Question. here is an Example of Code you want - so i think. @echo off prompt $g$s setlocal enabledelayedexpansion rem Parameter set begin=307 set end=1550 rem End Parameter set /a odd=2*end +1 -begin call :strLen odd len set /a pre=1 for /l %%i in (1 1 %len%) do set /a "...
by pieh-ejdsch
19 Aug 2016 07:39
Forum: DOS Batch Forum
Topic: Send CMD output to Variable - having trouble
Replies: 13
Views: 8126

Re: Send CMD output to Variable - having trouble

You take a 2nd findstr and variable set once

Code: Select all

for /f "tokens=1*delims=:" %%G in ('findstr /n "^" %TBL_CNT% ^|findstr "^3:"') do set "VAR=%%H"


Phil
by pieh-ejdsch
17 Aug 2016 06:00
Forum: DOS Batch Forum
Topic: If exists, rename archive.
Replies: 4
Views: 3934

Re: If exists, rename archive.

To what you create the variable if you do not take them set "filename=C:\Users\PP_lemev\Desktop\Newfolder\01_%YEAR%.7z" ? instead of cd C:\Users\PP_lemev\Desktop\Newfolder take this set "Source=C:\Users\PP_lemev\Desktop\Newfolder" set "file=01_%YEAR%" if not exist "...
by pieh-ejdsch
16 Aug 2016 13:07
Forum: DOS Batch Forum
Topic: Problem with a game
Replies: 5
Views: 5093

Re: Problem with a game

You test this Write for the axis x;y and exclude. @echo off @setlocal EnableDelayedExpansion @mode con cols=58 lines=18 @color f0 @for %%i in (choice.exe) do @( for /f "delims==-" %%i in ('2^>nul set') do set "%%i=" set Path=%%~dp$PATH:i ) @set prompt=$G$S @for /L %%i in (58,1,50...
by pieh-ejdsch
02 Jul 2016 02:39
Forum: DOS Batch Forum
Topic: ECHO ON / OFF behavior within a loop
Replies: 2
Views: 5135

Re: ECHO ON / OFF behavior within a loop

A for Loop is one Line, DO is the same Line to. Before this line execute Echo ON will Show this line . Echo OFF just execute this line. ECHO ON/OFF works only line-by-line. Use echo set ... :SetEchoBack @setlocal @ :: Liest ob ECHO ON oder OFF geschalten ist um Variablen zu setzen @( echo>"%tem...
by pieh-ejdsch
12 Jun 2016 02:58
Forum: DOS Batch Forum
Topic: Batch Runs Differently in Win 7 and Win 8???
Replies: 3
Views: 3554

Re: Batch Runs Differently in Win 7 and Win 8???

This Program is not for user mode.
this will work in a other window like a runas command

Code: Select all

runas /user:administrator /noprofile Batchwithdiskpart.cmd
by pieh-ejdsch
14 May 2016 06:05
Forum: DOS Batch Forum
Topic: Variables and String Connection
Replies: 6
Views: 4790

Re: Variables and String Connection

you mean this setlocal rem %0 liest aus einer Eingabe am prompt rem Anwendung liest auch aus einer Pipe :: (echo 03& echo testname) | Anwendung rem Anwendung liest auch aus einer Datei :: Anwendung <filename :DoWhile set "EL=" (call;)& :: Errorlevel=0 REM ID des PeripherieServers e...
by pieh-ejdsch
28 Apr 2016 07:45
Forum: DOS Batch Forum
Topic: Timing for commands
Replies: 6
Views: 5291

Re: Timming for commands

this some tests with timings: goes up to 200 frames and more eg 1000 calculates itself @echo off setlocal enabledelayedexpansion prompt $g$s :setCheckframes set /a Frames = %1 &:: soll je sekunde if !frames! lss 1 set /a Frames = 5 set frames set /a Stops =20 &:: 10251 mit 2 Runden = 50 Hert...
by pieh-ejdsch
27 Apr 2016 01:51
Forum: DOS Batch Forum
Topic: Passing batch argument to Choice command
Replies: 20
Views: 18406

Re: Passing batch argument to Choice command

thefeduke wrote:... because the choice character was displayed on the screen capitalized. Does anyone know why that would happen?


choice /cs /c abc
by pieh-ejdsch
25 Apr 2016 16:36
Forum: DOS Batch Forum
Topic: Waiting a fixed time for restricted user input
Replies: 23
Views: 16813

Re: Waiting a fixed time for restricted user input

long time ago I had created a CMC-chat with the function choice. This use choice to detect user input and tell STATUS or AFK to the others. There is different syntax between the codepage in XP and Win7 as well as external choice and since Vista against internal. In the infinite wide one of the hard ...
by pieh-ejdsch
18 Apr 2016 06:27
Forum: DOS Batch Forum
Topic: Batch to delete directory with path-too-long problem.
Replies: 16
Views: 17868

Re: Batch to delete directory with path-too-long problem.

Can you give me that errormessage

Code: Select all

dir /s /b m:\ 1>nul


Phil
by pieh-ejdsch
06 Apr 2016 07:53
Forum: DOS Batch Forum
Topic: [code] Batch Clock Widget
Replies: 51
Views: 84578

Re: [code] Batch Clock Widget

Einstein you put this rem delim + = " TAB rem Tausche Escape Zeichen der Anweisung mit Zollzeichen der Optionen for /F tokens^=1^,4delims^=^.^-^{^"^ %%a in ('"wmic OS Get LocalDateTime,MUILanguages |find " " "') do if "%%~b" neq "" set "daTi=%%a...