Back

KiSS batchfiles

Two batch files for use with DOS executables:

CEL.BAT

A batch file to make cels (and a kcf file) from all gifs in a directory using GIF2CEL.EXE and move them to a subdirectory. Copy and paste the text between the lines to a file and name it "cel.bat"; put this file and GIF2CEL.EXE in the directory where the image files are. The idea is to edit the batch file beforehand, then run it by typing CEL or clicking on CEL.BAT in the Explorer.
To use the batch file with PCX2CEL.EXE, replace "gif" with "pcx" and edit as needed.


REM put the names of the image files between brackets, wildcards allowed
FOR %%a IN (a*.gif 1?.gif) DO CALL gif2cel %%a /t

REM make palette from a suitable file (rename to the name of your choice)
RENAME an_image.kcf 256colours.kcf

REM put the palette in the subdirectory CELS (make sure it exists!)
MOVE 256colours.kcf cels

REM move cels to subdirectory CELS
move *.cel cels

REM get rid of the other kcf files
del *.kcf



MAKELZH.BAT

This batch file compresses your files into a set with LHA.EXE. It doesn't have to be edited before use, but must be run from the DOS prompt, as it requires parameters. Copy and paste the text between the lines to a file MAKELZH.BAT, then type makelzh at the DOS prompt to see instructions. (Unfortunately, the M switch doesn't always work.)


@ECHO OFF

rem For KiSS authors: a batch file to prevent unnecessary files being
rem included. It only compresses files with the extents CEL, KCF, CNF,
rem TXT, DOC, WAV, AU, MID, RMI and KTN.
rem Made for LHA version 2.55, I assume it works with all versions.

IF "%1"=="" GOTO _help
SET switch_=%2
IF "%switch_%"=="M" IF "%switch_%"=="m" GOTO _main

SET switch_=A

:_main
FOR %%a IN (*.cel *.kcf *.cnf *.txt *.doc *.wav *.au *.mid *.rmi *.ktn) DO LHA %switch_% %1 %%a
GOTO _end

:_help
echo.
echo Usage: MAKELZH archive-name [M]
echo. 
echo The second argument is optional and means the compressed files will
echo be "moved" into the archive, i.e. deleted after compression. The
echo archive filename can be with or without ".lzh" extension, as it is
echo passed directly as an argument to the LHA executable.
echo.
echo  Example:
echo   MAKELZH bbeauty.lzh     Make archive of "Black Beauty" KiSS files
echo   MAKELZH C:\temp\john    Makes john.lzh in C:\temp (but the files
echo                           have to be in the current directory)
echo   MAKELZH \temp\ksset M   Makes ksset.lzh in \temp of current drive
echo                           and deletes files in current directory
echo.
echo The KiSS files should be in the current directory, and the batch
echo file and LHA executable either in the same directory or in a
echo directory in the PATH variable. Although the archive can be put in
echo a different directory and/or on a different drive, the batch doesn't 
echo check if they exist, so LHA will exit with an error. 
echo.
goto _end

:_end
SET switch_=
ECHO ON





Top