home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Multimed
/
Multimed.zip
/
albmppb6.zip
/
encode_all.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-12-11
|
1KB
|
63 lines
/*╔════════════════════════════════════════════════════════════════════╗
╚════════════════════════════════════════════════════════════════════╝*/
/* check whether RxFuncs are loaded, if not, load them */
IF RxFuncQuery('SysLoadFuncs') THEN
DO
/* load the load-function */
CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
/* load the Sys* utilities */
CALL SysLoadFuncs
END
ARG Arg1
/* Print title */
SAY ''
SAY 'Encode All by Norbert Heller '
/* check for options */
Option = "FO"
GotError = 0
/* DO UNTIL Arg2 = '' */
Files. = ''
PARSE VAR Arg1 Filespec
/* Get files & directories, according to Option */
call SysFileTree '*.wav', 'Files', Option
/* For each filespec, try to obtain the icon */
DO i = 1 TO Files.0
/* length of the string incl path */
lengthfile = LENGTH(Files.i)
/* without ending .xyz */
name = LEFT(Files.i, lengthfile-4)
/* last position of "\" */
s = LASTPOS( "\", Files.i)
/* now filename length without path and extension */
t = lengthfile-4-s
/* copy string from the right side */
name1 = RIGHT(name, t)
/* now we have the name of the file */
say "name of file " || name1 || ".mp2"
"encode "|| Files.i || " " || name1||".mp2 -b192"
rc=stream(Files.i, 'c', 'close')
"del "|| Files.i
END