home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
ka9q
/
pcelm321.zip
/
SHOWPART.BAT
< prev
Wrap
DOS Batch File
|
1993-07-11
|
3KB
|
203 lines
@echo off
REM
REM showpart.bat; an MSDOS batch language variant of the Cshell script
REM showpart for MIME
REM
REM Ported to MSDOS by Martin Freiss, freiss.pad@sni.de
REM
REM Syntax is
REM showpart filename msgid part allparts
REM
REM check if TMP environment variable is set
IF a%TMP%==a GOTO notmp
:gottmp
REM egregious hack to overcome the notorious root directory difficulty.
REM oh, for a _real_ operating system...
IF %TMP%==c:\ GOTO C
IF %TMP%==C:\ GOTO C
IF %TMP%==d:\\ GOTO D
IF %TMP%==D:\ GOTO D
IF %TMP%==e:\ GOTO E
IF %TMP%==E:\ GOTO E
IF %TMP%==f:\ GOTO F
IF %TMP%==F:\ GOTO F
IF %TMP%==g:\ GOTO g
IF %TMP%==G:\ GOTO G
IF %TMP%==h:\ GOTO h
IF %TMP%==H:\ GOTO H
IF %TMP%==i:\ GOTO i
IF %TMP%==I:\ GOTO I
IF %TMP%==j:\ GOTO j
IF %TMP%==J:\ GOTO J
IF %TMP%==k:\ GOTO k
IF %TMP%==K:\ GOTO K
IF %TMP%==l:\ GOTO l
IF %TMP%==L:\ GOTO L
IF %TMP%==m:\ GOTO m
IF %TMP%==M:\ GOTO M
IF %TMP%==n:\ GOTO n
IF %TMP%==N:\ GOTO N
IF %TMP%==o:\ GOTO o
IF %TMP%==O:\ GOTO O
IF %TMP%==p:\ GOTO p
IF %TMP%==P:\ GOTO P
IF %TMP%==q:\ GOTO q
IF %TMP%==Q:\ GOTO Q
IF %TMP%==r:\ GOTO r
IF %TMP%==R:\ GOTO R
IF %TMP%==s:\ GOTO s
IF %TMP%==S:\ GOTO S
IF %TMP%==t:\ GOTO t
IF %TMP%==T:\ GOTO T
IF %TMP%==u:\ GOTO u
IF %TMP%==U:\ GOTO U
IF %TMP%==v:\ GOTO v
IF %TMP%==V:\ GOTO V
IF %TMP%==w:\ GOTO w
IF %TMP%==W:\ GOTO W
IF %TMP%==x:\ GOTO x
IF %TMP%==X:\ GOTO X
IF %TMP%==y:\ GOTO y
IF %TMP%==Y:\ GOTO Y
IF %TMP%==z:\ GOTO z
IF %TMP%==Z:\ GOTO Z
:mkwork
REM make a work directory, and copy the file there
mkdir %TMP%\mime
REM check if file exists already.
IF EXIST %TMP%\mime\%3 goto fileexists
copy %1 %TMP%\mime\%3
IF %3==%4 GOTO gotall
echo Done part %3
GOTO end
:fileexists
REM multiple partial messages are being decoded
echo Sorry, can handle only one split MIME mail at a time.
echo There already is a partial message with this part number. The mail
echo you are currently reading belongs to another split message.
echo
echo Mail not processed.
goto end
:gotall
FOR %%i IN (%TMP%\mime\*) DO type %%i >> %TMP%\mime\full.mm
REM delete partial files
for %%i in (%TMP%\mime\*) do del %%i
REM do something with the file
metamail -d %TMP%\mime\full.mm
echo To save space, the full file is now being deleted. You will have
echo to read all %4 parts again to see the full message.
rem del %TMP%\mime\full.mm
goto end
:C
set TMP=c:
GOTO mkwork
:D
set TMP=d:
GOTO mkwork
:E
set TMP=e:
GOTO mkwork
:F
set TMP=f:
GOTO mkwork
:G
set TMP=g:
GOTO mkwork
:H
set TMP=h:
GOTO mkwork
:I
set TMP=i:
GOTO mkwork
:J
set TMP=j:
GOTO mkwork
:K
set TMP=k:
GOTO mkwork
:L
set TMP=l:
GOTO mkwork
:M
set TMP=m:
GOTO mkwork
:N
set TMP=n:
GOTO mkwork
:O
set TMP=o:
GOTO mkwork
:P
set TMP=p:
GOTO mkwork
:Q
set TMP=q:
GOTO mkwork
:R
set TMP=r:
GOTO mkwork
:S
set TMP=s:
GOTO mkwork
:T
set TMP=t:
GOTO mkwork
:U
set TMP=u:
GOTO mkwork
:V
set TMP=v:
GOTO mkwork
:W
set TMP=w:
GOTO mkwork
:X
set TMP=x:
GOTO mkwork
:Y
set TMP=y:
GOTO mkwork
:Z
set TMP=z:
GOTO mkwork
:notmp
echo TMP not set. Please set TMP to a directory to use for temporary files.
:end
pause