artem9p
Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору помогите был код работал Код: setlocal enabledelayedexpansion set "var5=0" set "var6=-1000" set "var7=d:\pele.dbf" for /f "tokens=1" %%b in ('CDBFlite %var7% /count') do ( set "var1=%%b ") for /l %%a in (1,1, %var1%) do ( for /f "tokens=1" %%b in ('CDBFlite %var7% /order:TOTAL,POK /range:%%a /select:POK') do ( set "var2=%%b") for /f "tokens=1" %%b in ('CDBFlite %var7% /order:TOTAL,POK /range:%%a /select:POK_0') do ( set "var3=%%b ") for /f "tokens=1" %%b in ('CDBFlite %var7% /order:TOTAL,POK /range:%%a /select:NUMBPERS') do ( set "var0=%%b ") set /a var4=!var2!-!var3! if !var4! GTR %var5% (echo %%a-!var0!-!var2!-!var3!-!var4!-OK) else ( if !var4! EQU %var5% (echo %%a-!var0!-!var2!-!var3!-!var4!-OK) else ( if !var4! LSS %var6% (echo %%a-!var0!-!var2!-!var3!-!var4!-OK) else ( if !var4! LSS %var5% ( CDBFlite %var7% /order:TOTAL,POK /range:%%a /field:POK=!var3! /update CDBFlite %var7% /order:TOTAL,POK /range:%%a /field:POK_0=!var2! /update echo %%a-!var0!-GOTOVA-%%a-!var2!-!var3!-!var4!-OK ) else ( echo %%a--no-!var0!--!var2!-!var3!-!var4!-ERRRRRRRRRRRRR ))))) | доработал немного добавил перебор файлов в папке Код: setlocal enabledelayedexpansion set "var5=0" set "var6=-1000" set "thePATH=d:" for %%I in (%thePATH%\*pele*.dbf) do ( set "var7=%%I" for /f "tokens=1" %%b in ('CDBFlite !var7! /count') do ( ------- суда передаєтсо норм set "var1=%%b" for /l %%a in (1,1, !var1!) do ( for /f "tokens=1" %%d in ('CDBFlite !var7! /order:TOTAL,POK /range:%%a /select:POK') do ( ----- суда нет уже.. set "var2=%%d") for /f "tokens=1" %%z in ('CDBFlite !var7! /order:TOTAL,POK /range:%%a /select:POK_0') do ( set "var3=%%z ") for /f "tokens=1" %%x in ('CDBFlite !var7! /order:TOTAL,POK /range:%%a /select:NUMBPERS') do ( set "var0=%%x ") set /a var4=!var2!-!var3! if !var4! GTR %var5% (echo %%a-!var0!-!var2!-!var3!-!var4!-OK) else ( if !var4! EQU %var5% (echo %%a-!var0!-!var2!-!var3!-!var4!-OK) else ( if !var4! LSS %var6% (echo %%a-!var0!-!var2!-!var3!-!var4!-OK) else ( if !var4! LSS %var5% ( CDBFlite !var7! /order:TOTAL,POK /range:%%a /field:POK=!var3! /update CDBFlite !var7! /order:TOTAL,POK /range:%%a /field:POK_0=!var2! /update echo %%a-!var0!-GOTOVA-%%a-!var2!-!var3!-!var4!-OK ) else ( echo %%a--no-!var0!--!var2!-!var3!-!var4!-ERRRRRRRRRRRRR ))))))) pause | непередаєтсо переманная вар7 непойму почему.. |