home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
flink11.zip
/
FileType.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-02-28
|
712b
|
35 lines
/* hejsan
c:\file\upload\vgademo.zip
1 2 3
*/
parse arg File
if File = '' then call usage
result = stream( File, 'c', 'open read' )
select
when charin(File,1,4) == x2c(504b0304) then t='Zip'
when charin(File,3,5) == "-lh5-" then t='Lha'
when charin(File,3,3) == "-lh" then t='Lzh'
when charin(File,1,1) == x2c(1a) then t='Arc'
when charin(File,1,4) == "DMS!" then t='Dms'
when charin(File,1,2) == x2c(60ea) then t='Arj'
otherwise
t='Unknown compression method.'
end
result = stream( File, 'c', 'close' )
return t
usage:
say
say 'Usage: '
say ' cmd: FileType <file>'
say ' rexx: filetype( file );'
exit