[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

PB program help.



This is the batch file that is locking up my computer and I cannot see 
where.

REM@ECHO OFF
REM
REM dofile.bat
REM This batch file will run under MS-DOS.
REM
REM It first identifies the compression type and stores that in an
REM environment variable C.
REM
REM It then checks the file type and processes different file types
REM appropriately.
REM
REM You must have a directory \msgs off of your main
REM PACSAT operating directory. It puts ASCII readable text into
REM files called nnnn.msg, where nnnn is replaced by the message 
REM number. 
REM
pfh_val %1.dl 25 >nul
if errorlevel 4 goto uct
if errorlevel 3 goto lha
if errorlevel 2 goto zip
if errorlevel 1 goto arc
goto nocomp

REM Compression type is ARC
:arc
ECHO Compressed by PKARC
SET C=ARC
goto proc

REM Compression type is ZIP
:zip
ECHO Compressed by PKZIP
SET C=ZIP
goto proc

REM Compression type is LHARC
:lha
ECHO Compressed by LHZ
SET C=LHA
goto proc

REM Compression type is unknown
:uct
ECHO Compressed by an unknown technique.
SET C=UCT
goto proc

REM No compression type field in the file
:nocomp
ECHO Message is not compressed.
SET C=NO
goto proc

:proc
pfh_val %1.dl 8 >nul

if errorlevel 3 goto ubt
if errorlevel 2 goto bbs
if errorlevel 1 goto bbs1
goto text

REM Unknown body type.
:ubt
ECHO Unknown message body type.
goto done

REM Multiple BBS messages
:bbs
ECHO Message body contains multiple BBS messages
goto done

REM Single BBS message
:bbs1
ECHO Message body is a BBS message
goto done

:text
ECHO Message body is plain text. Processing.
if "%C%"=="ZIP" goto txtzip
if "%C%"=="ARC" goto txtarc
if "%C%"=="LHA" goto txtlha
if "%C%"=="UCT" goto txtuct
if "%C%"=="NO" goto txtno
goto err

:txtno
REM Uncompressed ASCII text message.
phs %1.dl /s /o msgs\%1.msg /t /x
goto done

:txtzip
REM Zipped ASCII text message.
REM Gets the .zip file from the PACSAT message
phs %1.dl /s /o %1.zip /x
REM
REM Unzipps it to the screen, but redirects the screen to a .msg file.
pkunzip /c %1.zip >msgs\%1.msg
REM
REM Deletes the .zip file
del %1.zip
goto done

:txtarc
REM Arc'ed ASCII text message.
goto done

:txtlha
REM Lharced ASCII text message.
REM LHArced ASCII text message.
REM Gets the .lhz file from the PACSAT message
phs %1.dl /s /o %1.lzh /x
REM
REM decompress it to the screen, but redirect to a .msg file.
lha p %1.lzh >msgs\%1.msg
REM
REM Deletes the .lzh file
del %1.lzh

goto done

:txtuct
REM Text message with unknown compression type.
ECHO Unknown compression type on text file
goto done

:bbs
if "%C%"=="ZIP" goto bbszip
if "%C%"=="ARC" goto bbsarc
if "%C%"=="LHA" goto bbslha
if "%C%"=="UCT" goto bbsuct
if "%C%"=="NO" goto bbsno
goto err

:bbsno
goto done

:bbszip
goto done

:bbsarc
goto done

:bbslha
goto done

:bbsuct
goto done

:bbs1
if "%C%"=="ZIP" goto bbs1zip
if "%C%"=="ARC" goto bbs1arc
if "%C%"=="LHA" goto bbs1lha
if "%C%"=="UCT" goto bbs1ct
if "%C%"=="NO" goto bbs1no
goto err

:bbs1no
phs %1.dl /s /o msgs\%1.msg /h /x  *** this is line 158 ***
goto done

:bbs1zip
goto done

:bbs1arc
goto done

:bbs1lha
goto done

:bbs1uct
goto done

:err
REM error
ECHO There was an error!
:done
xcopy %1.dlx dlxfiles >nul       **** this is line 177  *****
if errorlevel 1 goto end
del %1.dlx
:end
set c=

the program DOFILE.bat ran and it stopped and locked up the laptop
the line it stopped at was line number  158      
and the screen showed this:-
C:\DIGISAT\UO-22>phs 7280c.dl /s /o msgs\7280c.msg /t /x
Bad command or file name

C:\DIGISAT\UO-22>goto done

C:\DIGISAT\UO-22>xcopy 7280c.dlx dlxfiles >nul

the above is where the screen stopped and locked up (line 177)

I cannot undrstand ths batch file's operation, could someone explain,
I am interested where it locks up, it is stalling my decoding of uo-22 and
I guess the others I have downloaded

thanks for any help

Peter.

73 Peter VE7AHX.
ve7ahx@rac.ca
progers@lightspeed.ca

----
Via the amsat-bb mailing list at AMSAT.ORG courtesy of AMSAT-NA.
To unsubscribe, send "unsubscribe amsat-bb" to Majordomo@amsat.org



AMSAT Top AMSAT Home