set COPYCMD=/Y

for %%s in (download\*.*) do del %%s

unzip.exe newf1.zip

md scripts.bak

if not exist download\phoneitl.dms goto NOPHONE
    if exist phoneitl.bak del phoneitl.bak
    if exist phoneitl.dms ren phoneitl.dms *.bak
    copy download\phoneitl.dms .
    del  download\phoneitl.dms
:NOPHONE

if not exist download\priccode.txt goto NOCODES
    if exist priccode.bak del priccode.bak
    if exist priccode.txt ren priccode.txt *.bak
    copy download\priccode.txt .
    del  download\priccode.txt
:NOCODES

if not exist download\autoupd.bat goto END

cd download
call autoupd.bat
cd ..

:END
    for %%s in (download\*.*) do del %%s
    del newf1.zip
