ok here is the relevant part of the code:
Code: Select all
@Echo off
:start
set drive=c
:repeat
set CHECK=no
set %drive%ver=0
set %drive%date=none
dir %drive%:\ 2>&1|findstr /b /i /r /c:" Volume in drive ">nul
IF "%errorlevel%"=="1" (goto driverror)
if exist %drive%:\nodv4_upd\update.ver (set CHECK=Yes)
IF %CHECK%==Yes (goto found) else (goto notfound)
:found
Echo ----------------------------
Echo ----------------------------
echo Found updates on %drive%:
if exist %drive%:\nodv4_upd\em002_32_l2.nup (set ENGINE2=Yes)
IF %CHECK%==Yes (goto e2found) else (goto e2notfound)
:e2found
Echo Found ENGINE2
set ver=0
set date=none
Echo Now looking at file version
for /f "skip=2 tokens=2 delims== " %%a in ('find "version=" %drive%:\nodv4_upd\em002_32_l2.nup') do set ver=%%a
for /f "skip=2 tokens=3 delims== " %%a in ('find "version=" %drive%:\nodv4_upd\em002_32_l2.nup') do set date=%%a
Echo %ver% %date%
set %drive%ver=%ver%
Echo ----------------------------
Echo ----------------------------
goto end
:driverror
echo Could not read Drive %Drive%:
goto end
:e2notfound
echo Culd not find ENGINE2
echo can not use updates
:notfound
echo updates not found on %drive%
goto %drive%
:end
goto %drive%
:c
set drive=d
goto repeat
:d
set drive=e
goto repeat
:e
set drive=f
goto repeat
:f
set drive=g
goto repeat
:g
set drive=h
goto repeat
:h
set drive=i
goto repeat
:i
set drive=j
goto repeat
:j
set drive=k
goto repeat
:k
set drive=l
goto repeat
:l
set drive=m
goto repeat
:m
set drive=n
goto repeat
:n
set drive=o
goto repeat
:o
set drive=p
goto repeat
:p
set drive=q
goto repeat
:q
set drive=r
goto repeat
:r
set drive=s
goto repeat
:s
set drive=t
goto repeat
:t
set drive=u
goto repeat
:u
set drive=v
goto repeat
:v
set drive=w
goto repeat
:w
set drive=x
goto repeat
:x
set drive=y
goto repeat
:y
set drive=z
goto repeat
:z
Echo Done checking for Updates
Echo Now Looking for the latest updates
pause
Contents of :
em002_32_l2.nup
this file is the main file that contains the update info
And this file is the file that usely changes
the "version=5276" changes with etch new update to eg "version=5277"
so i would rather find the latest version then a older one
the variable is set to %drive%ver for etch drive eg. %cver%,%dver%,%ever% ect
Code: Select all
[update_info]
name=ENGINE2
version=5276 (20100713)
versionid=5276
build=7465
type=engine
category=engine
level=2
base=7363
date=13.07.2010
platform=x86
group=perseus,ra
filesize=695304
crc=5681181
buildregname="EngineBuild"
filename="em002_32.dat"
Also needs A file called:
update.ver
In a folder of a root called:
nodv4_upd