Search found 38 matches

by A_Bobby
21 Nov 2022 15:49
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Re: Timeout via for loop

I ran the code within the script but could not get what I wanted. So I created a separate snippet of the code you gave below and unremmed it. I ran it against the attached bug report after I introduced false positives from the errorlist.txt in the log file, but i go the following output (edited). It...
by A_Bobby
10 Nov 2022 05:40
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Re: Timeout via for loop

Yes, any/all strings before the pipe (and minus one space before the pipe) needs to be spat out in the script.
by A_Bobby
09 Nov 2022 17:54
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Re: Timeout via for loop

No, that does not do it. Disabling echo I see the script stuck at if defined err goto :errordisplay Sorry if I have not been very clear on this. So the log that is generated (under logs directory) needs to be parsed for each string listed in errorlist.txt. If there is a single string match or a mult...
by A_Bobby
09 Nov 2022 08:27
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Re: Timeout via for loop

So strings are as follows and do a pipe delimiter to get 1st token BERR_OUT_OF_SYSTEM_MEMORY | Dynamic heap issue SAGE specific error | DRM_WVOemCrypto Failed to allocate omx component 'OMX.bcm.vdec.avc.secure' | H264 encoded streams SD/HD Failed to allocate omx component 'OMX.bcm.vdec.av1' Failed t...
by A_Bobby
08 Nov 2022 16:44
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Re: Timeout via for loop

It does but I want it to find all strings it can find in the errorlist.txt and spit them out.
by A_Bobby
02 Nov 2022 16:22
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Re: Timeout via for loop

Thanks a lot Steffen for this. This works like a charm. Still trying to wrap my head around these 2 loops for /f "tokens=1,2 delims=#" %%a in ( 'prompt #$H#^&for /f %%b in ^('copy /z "%~f0" nul'^) do %%b# 2^>nul' ) do (set "del=%%a"&set "cr=%%b") and for /f %%i in ('^(cmd /u /c "<nul set /p=%~1"^)^|...
by A_Bobby
31 Oct 2022 16:51
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Re: Timeout via for loop

This is simply awesome!! A little convoluted but awesome nevertheless. As I said originally that I need small 2 to 3 lines of code to do this but with batch, it's not possible so in order to not make my script a hundred's of lines long, I need to run another loop which essentially uses utility calle...
by A_Bobby
31 Oct 2022 15:06
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Re: Timeout via for loop

So I did the following for /l %a in (5,-1,1) do @ping -n 2 localhost >nul && @echo Waiting for %a seconds... and while it does get me what I need, the scrolling format is not acceptable, has to be just one line changing just the second value. This is not entirely accurate second count but my output ...
by A_Bobby
31 Oct 2022 14:48
Forum: DOS Batch Forum
Topic: Timeout via for loop
Replies: 15
Views: 16794

Timeout via for loop

Hi, Trying to display just "Waiting for n seconds" from a timeout command without the press any key to continue or even press CTRL+C using /nobreak option. Is it possible to use a for loop for that (or any other method)? I tried to parse tokens but the output only displays after the entirety of the ...
by A_Bobby
05 Oct 2014 08:11
Forum: DOS Batch Forum
Topic: WMIC query in for loop
Replies: 7
Views: 8594

Re: WMIC query in for loop

Double quotes did the trick. Thanks!
I am getting desired output except that the last line I get "Echo is on". I copied the command in .cmd file with @echo off in the beginning but it still does it.
by A_Bobby
04 Oct 2014 18:21
Forum: DOS Batch Forum
Topic: WMIC query in for loop
Replies: 7
Views: 8594

WMIC query in for loop

Hi, By running the following query, I get my response with headers (IPAddressName and InstanceName) which I want to eliminate wmic /NameSpace:\\root\Microsoft\SqlServer\ComputerManagement11 Path ServerNetworkProtocolProperty where (PropertyName='IPAddress' or IPAddresName='IPAll') get IPAddressName,...
by A_Bobby
10 May 2014 13:57
Forum: DOS Batch Forum
Topic: Trying to create DISKPART script using batch file
Replies: 5
Views: 10571

Re: Trying to create DISKPART script using batch file

Awesome! thanks a lot!
The diskpartscript.txt handles all four drive letters. Is there a way to create 4 separate scripts?
by A_Bobby
10 May 2014 08:28
Forum: DOS Batch Forum
Topic: Trying to create DISKPART script using batch file
Replies: 5
Views: 10571

Re: Trying to create DISKPART script using batch file

Thanks for the reply! If you look at the second part of the script you will see "assign letter E" command. This is a constant in the script. I cannot have all four drives with letter E. The first 180 GB disk (Disk 5) will be assigned E, disk 6 F and so on. So in order to achieve this I hav...
by A_Bobby
10 May 2014 07:07
Forum: DOS Batch Forum
Topic: Trying to create DISKPART script using batch file
Replies: 5
Views: 10571

Trying to create DISKPART script using batch file

Hi, I have about 100 servers that will be presented with SAN storage. I want to create a diskpart script that will initialize disk, create volume, format and assign drive letter. Each server will be presented with four LUNs 180 GB each. The problem is that these LUNs are being presented along with s...
by A_Bobby
14 Sep 2012 07:08
Forum: DOS Batch Forum
Topic: WMIC not returning the right errorlevel
Replies: 3
Views: 7259

Re: WMIC not returning the right errorlevel

Thanks foxidrive. !errorlevel! worked. Even though I cannot see the output (it just prints !errorlevel! on screen when echo is on) it apparently picks up the right patches.