Search found 118 matches

by elzooilogico
05 May 2020 14:37
Forum: DOS Batch Forum
Topic: Depicus wake on lan batch file question
Replies: 3
Views: 1086

Re: Depicus wake on lan batch file question

that's what pause command does, wait for user to press a key. simply change

Code: Select all

pause
to

Code: Select all

timeout /t 2
to wait two seconds
by elzooilogico
20 Apr 2020 09:11
Forum: DOS Batch Forum
Topic: How to disable Avast until reboot
Replies: 7
Views: 1696

Re: How to disable Avast until reboot

aren't those procceses (or at least one of them) services?

in that case you need

Code: Select all

sc stop ""ServiceName"
or

Code: Select all

net stop "ServiceName"
by elzooilogico
06 Apr 2020 09:12
Forum: DOS Batch Forum
Topic: Windows Batch - Print line file containing exclamation mark
Replies: 6
Views: 1722

Re: Windows Batch - Print line file containing exclamation mark

disable delayed expansion, unless you are doing something with sLine you don't need it, change set "sLine=%%A" echo !sLine! to echo %%A or use call set "..." call echo %...% ro reflect changes in a block of code you cannot do string proccessing with for variables, but you can turn off delayed expans...
by elzooilogico
02 Mar 2020 13:01
Forum: DOS Batch Forum
Topic: [SOLVED] Extract each whole line that contains a specific word.
Replies: 8
Views: 3771

Re: Extract each whole line that contains a specific word.

Code: Select all

for /f "delims=" %%i in ('findstr "\<true\>" "MyFile.wccf"') do echo %%i
if you are running it in a batch script

Code: Select all

for /f "delims=" %i in ('findstr "\<true\>" "MyFile.wccf"') do echo %i
if you run it in command line
by elzooilogico
31 Oct 2019 11:01
Forum: DOS Batch Forum
Topic: Batch script to login to multiple windows server
Replies: 8
Views: 4904

Re: Batch script to login to multiple windows server

with cmdkey yoy can store credentials to access computers over the net. read the cmdkey command help. long ago I used a batch script which executes cmdkey and wmic to run proccesses and fetch its output over many servers. no need to logon, nor any user session on remote server, provided not gui app ...
by elzooilogico
15 Oct 2019 08:31
Forum: DOS Batch Forum
Topic: How can you compare two files Binary and notify?
Replies: 3
Views: 7718

Re: How can you compare two files Binary and notify?

Code: Select all

fc /b path\file1.bin path\file2.bin
if %errorlevel% neq 0 (
  echo(files are different
) else (
  echo(files are identical
 )
see

Code: Select all

fc /?
for further information, and

Code: Select all

for /f
about to capture output of a command
by elzooilogico
23 Aug 2019 13:58
Forum: DOS Batch Forum
Topic: mutiple validation in same do not working
Replies: 2
Views: 2595

Re: mutiple validation in same do not working

review your code, you have unbalanced parentheses. try to change

Code: Select all

echo(…
to

Code: Select all

echo/…
to see what's happening. then tou may return to

Code: Select all

echo(…
as it has especial meaning, it's not an opening parens ar all!
by elzooilogico
08 Jul 2019 11:56
Forum: DOS Batch Forum
Topic: Months SCHTASKS
Replies: 2
Views: 3013

Re: Months SCHTASKS

please, write in english, though many of us have other native language, we use english in this site!
by elzooilogico
04 Jun 2019 00:06
Forum: DOS Batch Forum
Topic: Text Files - Coloured Characters
Replies: 6
Views: 3409

Re: Text Files - Coloured Characters

or you may try ansicon
by elzooilogico
17 Feb 2019 13:42
Forum: DOS Batch Forum
Topic: First read from file always fails
Replies: 3
Views: 1435

Re: First read from file always fails

and more over, here simply

Code: Select all

echo(%%A
but, of course, details are not explicit
by elzooilogico
08 Feb 2019 13:47
Forum: DOS Batch Forum
Topic: Move file to folder based on part of file name
Replies: 4
Views: 1377

Re: Move file to folder based on part of file name

maybe misuse of string substitution, surf this place and tell us where you're stuck!
by elzooilogico
07 Feb 2019 08:44
Forum: DOS Batch Forum
Topic: Manage multiple databases services using batch script
Replies: 16
Views: 3728

Re: Load multiple parameters from file

think you are looking for this but, please ask what is your real task show us what have you tried as, we are here to help, not to do your own work now, you may also call the script with a param as scriptname "service_name" @echo off setlocal enabledelayedexpansion set "MyServiceName=Enter_Name_here"...
by elzooilogico
06 Feb 2019 06:19
Forum: DOS Batch Forum
Topic: Manage multiple databases services using batch script
Replies: 16
Views: 3728

Re: Load multiple parameters from file

Also, to avoid the intermediate file @echo off setlocal EnableDelayedExpansion set /a cnt=0 set "MyServiceName=Enter_Name_Here" for /f "tokens=1,* delims=: " %%G in ('sc query state^= all ^| find /I "SERVICE_NAME" ^| find /I "%MyServiceName%"') do (set /a cnt+=1 & set "param!cnt!=%%H") set param ech...