home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
MISC
/
EZY200-1.ARJ
/
EZYBATCH.ARJ
/
UPCONV.BAT
< prev
Wrap
DOS Batch File
|
2003-02-22
|
4KB
|
201 lines
@echo off
rem ********************************************
rem ** **
rem ** UpConv.Bat **
rem ** **
rem ** Copyright Peter Davies 1996 **
rem ** All Rights Reserved **
rem ** **
rem ** For use with Ezycom V1.20 Only **
rem ** **
rem ********************************************
echo Converting * %5.%7 to %5.%6 *
echo Testing %5.%7 for Integrity
rem If called stand alone, it checks to see if enough parameters were
rem passed to the batch file
if !%6! == !! goto endit
rem This is a list of the command line in upconv.bat and doconv.bat (Ezycom)
rem %1 1 node number
rem %2 C:\EZY\SECUPLD\ where uploaded
rem %3 C:\EZY\TEMP\CONV01 where it does it
rem %4 C: drive it is on
rem %5 LIST file name no ext
rem %6 ZIP ext to
rem %7 ARJ ext from (could be NULL)
:start
if exist %3\*.* goto :del
rem This file has no extension, we will not archive it up, just leave it
if !%7! == !! goto ENDIT
%4
md %3
cd %3
if !%7 == !TXT goto moveit
if !%7 == !DOC goto moveit
if !%7 == !LST goto moveit
if !%7 == !PAS goto moveit
if !%7 == !C goto moveit
if !%7 == !BAS goto moveit
FOR %%A IN (LZH ZIP ARC PAK SDN ZOO ARJ SQZ RAR COM EXE) DO IF %%A == %7 GOTO WAS%7
goto :finish
:moveit
copy %2%5.%7 %3
goto now%6
:del
attrib -A -S -H -R %3\*.*
echo Y | del %3\*.*
rd %3
goto start
:waszip
pkunzip -o %2%5.%7
rem Bad Zip
if errorlevel 51 goto dodel
rem Disk Full
if errorlevel 50 goto finish
rem Bad Zip
if errorlevel 9 goto dodel
rem Not Enough Memory
if errorlevel 4 goto finish
rem Bad Zip
if errorlevel 1 goto dodel
rem Zip OK
goto scan
:waslzh
lha e /cnm %2%5.%7
if errorlevel 1 goto dodel
goto scan
:wasarc
PKXARC -r %2%5.%7
if errorlevel 1 goto dodel
goto scan
:wassdn
:waspak
PAK e /wa %2%5.%7
if errorlevel 1 goto dodel
goto scan
:wassdn
:wasarj
arj e -y %2%5.%7
rem *** Bad ARJ
if errorlevel 9 goto dodel
rem *** Not enough Memory
if errorlevel 8 goto finish
rem *** Bad ARJ
if errorlevel 6 goto dodel
rem *** Disk Full
if errorlevel 5 goto finish
rem *** Bad ARJ
if errorlevel 1 goto dodel
goto scan
:waszoo
ZOO -e %2%5.%7
if errorlevel 1 goto dodel
goto scan
:wassqz
SQZ e /o1 %2%5.%7
if errorlevel 1 goto dodel
goto scan
:wasrar
RAR e -c- -o+ -y %2%5.%7
if errorlevel 1 goto dodel
goto scan
:wascom
:wasexe
copy %2%5.%7 %3
cd \
SCAN /NOMEM %3
if errorlevel 1 goto dodel
goto finish
:dodel
echo Deleting %2%5.%7 A Virus or Bad Archive
del %2%5.%7
goto finish
:scan
if exist ..\FILE_ID.%1 del ..\FILE_ID.%1
if exist DESC.SDI copy DESC.SDI ..\FILE_ID.%1
if exist FILE_ID.DIZ copy FILE_ID.DIZ ..\FILE_ID.%1 /Y
if exist FILE_ID.CLR copy FILE_ID.CLR ..\FILE_ID.%1 /Y
cd \
SCAN /NOMEM %3
if errorlevel 1 goto dodel
goto now%6
:nowzip
if exist %2%5.%7 del %2%5.%7
cd \
pkzip -o %2%5 %3\*.*
rem *** To add an archive comment use the following command
rem *** pkzip -z %2%5 <c:\path\comment.txt
goto finish
:nowlzh
if exist %2%5.%7 del %2%5.%7
cd \
lha a -tm %2%5 %3\*.*
goto finish
:nowarc
if exist %2%5.%7 del %2%5.%7
cd \
pkarc -oct -a %2%5 %3\*.*
goto finish
:nowpak
if exist %2%5.%7 del %2%5.%7
cd \
pak A /O /WA /L %2%5 %3\*.*
goto finish
:nowarj
if exist %2%5.%7 del %2%5.%7
cd \
arj m -ey -jm1 %2%5 %3\*.*
rem *** To add -zc:\path\comment.txt to the previous command
goto finish
:nowzoo
if exist %2%5.%7 del %2%5.%7
cd \
zoo -a %2%5 %3\*.*
goto finish
:nowsqz
if exist %2%5.%7 del %2%5.%7
cd \
sqz a /m4 /q0 %2%5 %3\*.*
goto finish
:nowrar
if exist %2%5.%7 del %2%5.%7
cd \
rar a -ep %2%5 %3\*.*
goto finish
:finish
cd \
attrib -A -S -H -R %3\*.*
echo Y | del %3\*.*
rd %3
:ENDIT