Search found 128 matches

by elzooilogico
15 Oct 2019 08:31
Forum: DOS Batch Forum
Topic: How can you compare two files Binary and notify?
Replies: 3
Views: 10629

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: 5092

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: 5071

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: 7295

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: 3902

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: 4074

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: 12623

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: 12623

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...
by elzooilogico
05 Feb 2019 07:53
Forum: DOS Batch Forum
Topic: Manage multiple databases services using batch script
Replies: 16
Views: 12623

Re: Load multiple parameters from file

Code: Select all

@echo off
setlocal enabledelayedexpansion
set /a cnt=0
for /f "delims== tokens=1" %%G in (%temp%\_list.log) do (set /a cnt+=1 & set "param!cnt!=%%G")
set param
please provide output for this
more also, you don't need an intermediate file, you can run the sc command in a for loop an fetch it's output
by elzooilogico
05 Feb 2019 06:32
Forum: DOS Batch Forum
Topic: Manage multiple databases services using batch script
Replies: 16
Views: 12623

Re: Load multiple parameters from file

give this a try

Code: Select all

setlocal enabledelayedexpansion
set /a cnt=0
for /f "delims== tokens=1" %%G in (%temp%\_list.log) do (set /a cnt+=1 & set "param!cnt!=%%G")
You need delayed expansion as cnt is incremented within a code block
to know how many params have been loaded just see what's inside cnt
by elzooilogico
01 Aug 2018 05:24
Forum: DOS Batch Forum
Topic: Reading a hidden password via a FINDSTR bug
Replies: 10
Views: 11975

Re: Reading a hidden password via a FINDSTR bug

Nice find Antonio. :D Working in WIn 8 Enterprise. But the password is still accesible through the keyboard buffer (just hit the up arrow key). I would suggest clearing the buffer after password read @echo off setlocal set /P "=_" < NUL > "Enter password" findstr /A:1E /V "^$" "Enter password" NUL >...
by elzooilogico
20 May 2018 07:52
Forum: DOS Batch Forum
Topic: difficult starting cmd prompt with execution of two commands
Replies: 4
Views: 5235

Re: difficult starting cmd prompt with execution of two commands

Code: Select all

start "" cmd /k "bla & bla & bla"
or

Code: Select all

start "" cmd "/k "bla &bla & bla""
cyquotation makes quite a difference. first quotes are window title