Search found 776 matches

by einstein1969
17 Jul 2012 13:37
Forum: DOS Batch Forum
Topic: Avoid call in for loop with complex variables
Replies: 9
Views: 2863

Avoid call in for loop with complex variables

Hi, I have a question about call set/call echo This is the code of example @echo off setlocal disabledelayedexpansion set param[1].1=aaa set param[1].2=BBB set param[1].3=ccc set param[2].1=111 set param[2].2=222 set param[2].3=333 set cont[1]=3 set cont[2]=2 echo %cont[1]% echo param[1].%cont[1]% c...
by einstein1969
07 Jul 2012 16:28
Forum: DOS Batch Forum
Topic: Progress bar While copying
Replies: 12
Views: 16682

Re: Progress bar While copying

The problem is xcopy... There is no chance to capture output when copy or is very difficult... Need the expert! I worked for solution and i found 3 or more solution. The first in my tests have not failed but need trick other the higher priority trick. (xp sp2 italian) @echo off if "%1" equ...
by einstein1969
07 Jul 2012 07:56
Forum: DOS Batch Forum
Topic: Progress bar While copying
Replies: 12
Views: 16682

Re: Progress bar While copying

thanks joakim but my problem not in the progress bar, it's in how i copy and show the progress bar at the same time Aacini has a cool progress bar also it show you the files that being copied "or supposed to be" but how i make it copy files for real :: Get USB Drive Letter SET "ID_1=...
by einstein1969
05 Jul 2012 16:28
Forum: DOS Batch Forum
Topic: [code] Mini-Monitor and allarm system
Replies: 4
Views: 3179

Re: Mini-Monitor and allarm system

You could try if it works typeperf? Start mini-monitor.config.cmd Output from mini-monitor.config.cmd (italian): For each counter installed and active there is one or more istances. The istance name is beetwen "()". The "_Total" instance is the sum of all instances of the counter...
by einstein1969
05 Jul 2012 08:17
Forum: DOS Batch Forum
Topic: Fast way to test if a value is between several ranges
Replies: 8
Views: 3820

Re: Fast way to test if a value is between several ranges

should be a problem of language. I added a topic with a new version that drives the choice of the counter. You can try with a counter \ processor. Look previus post
by einstein1969
05 Jul 2012 08:04
Forum: DOS Batch Forum
Topic: [code] Mini-Monitor and allarm system
Replies: 4
Views: 3179

[code] Mini-Monitor and allarm system

I'm creating a system of monitoring and alarm system to control a PC. I'm doing it via batch. I began studying the issue for a while and I'm trying to find any workaround for this to end. Initially it was monitoring the trashing of the disc and take action to suspend certain processes too invasive. ...
by einstein1969
04 Jul 2012 15:51
Forum: DOS Batch Forum
Topic: Fast way to test if a value is between several ranges
Replies: 8
Views: 3820

Re: Fast way to test if a value is between several ranges

Thanks to all!

I'll use this for my mini-monitor system for getup allarm if value in range!!!

This is my first attemp. http://www.dostips.com/forum/viewtopic.php?f=3&t=3502

EDIT: Open topic apart
by einstein1969
03 Jul 2012 03:42
Forum: DOS Batch Forum
Topic: Extract data between 2 words.
Replies: 5
Views: 1301

Re: Extract data between 2 words.

Code: Select all

set str="and select my,your,his(),* from pippo;"

set begin=%str:*select=%

set end=%str:*from=%

call set middle=%%begin:from%end%=%%

echo "%middle%"
by einstein1969
02 Jul 2012 06:14
Forum: DOS Batch Forum
Topic: how to change priority of pipe commands?
Replies: 13
Views: 5034

Re: how to change priority of pipe commands?

And I caught the problem of inverted parameters... 14.06.02,21> echo 123 | (start /b /wait cmd /c more) 123 14.06.07,43> exchanging /b /wait 14.06.07,43> echo 123 | (start /wait /b cmd /c more) 123 ^Z 14.07.16,77> and there is a line... This in XP SP2
by einstein1969
01 Jul 2012 14:46
Forum: DOS Batch Forum
Topic: I want to make StartProcess
Replies: 2
Views: 2382

Re: I want to make StartProcess

Thanks Antonio, I saw your work, is exceptional. Regarding the difficulty of creating this procedure agree with you that there are many dark sides, and little documentation. But some things do not serve, for example, font and window size. I think it is possible to use the defaults that are managed b...
by einstein1969
01 Jul 2012 12:22
Forum: DOS Batch Forum
Topic: how to change priority of pipe commands?
Replies: 13
Views: 5034

Re: how to change priority of pipe commands?

You are piping into 'start', not into 'more'. Right. My first post was in reply to jeb's clever usage of 'start'. The point I was making is that, with piped input, the 'start' behavior does not match the same command being run directly, but (sometimes?) requires an extra ^Z to close the pipe. In mo...
by einstein1969
01 Jul 2012 12:12
Forum: DOS Batch Forum
Topic: how to change priority of pipe commands?
Replies: 13
Views: 5034

Re: how to change priority of pipe commands?

' Odd, did you verify with taskManager ?, I ran 'test.CMD' @echo off start "" /high /b "cmd" /c "1.cmd" |start "" /high /b "cmd" /c "2.cmd" pause exit '1.CMD' And '2.CMD' @echo off echo.%~n0 pause and process '2.CMD' runs high as I expecte...
by einstein1969
30 Jun 2012 20:27
Forum: DOS Batch Forum
Topic: how to change priority of pipe commands?
Replies: 13
Views: 5034

Re: how to change priority of pipe commands?

' Some time ago, I discover a bug in the start command of winXP causing priority changes to fail. Just switching the order of the parameters should do it ( I hope ). start "" /high /b "cmd" /c "batch1.cmd" |start "" /high /b "cmd" /c "batch2.cm...
by einstein1969
30 Jun 2012 20:21
Forum: DOS Batch Forum
Topic: how to change priority of pipe commands?
Replies: 13
Views: 5034

Re: how to change priority of pipe commands?

So if you want to use it with pipes you could add the start command at each side. Interesting thought, thanks for the hint. That said, there is something odd with piping between two "start" commands. The following requires an ^Z to be manually entered before the command completes. C:\tmp>...
by einstein1969
29 Jun 2012 16:33
Forum: DOS Batch Forum
Topic: Kill a batch process
Replies: 2
Views: 1056

Re: Kill a batch process

This is not the solution , but in emergency cases works: 1) Open the file batch 2) On first line write: "Goto :eof" 3) save. If you can do these operation you stop the fork processes "manually". If you want a method for kill/suspend with more speed of this fork bomb you can try t...