/* ------------------------------------------------------------------------------ This program will remove the .new extension(s) of a filename. The extension is always due to an image processed with the 3-DEE-AREXX scripts. Host address: COMMAND Written by Jan Van Overbeke, 3-DEE, ©1993. Read the AREXX-Scripti doc, for more info about operation and rights! ------------------------------------------------------------------------------ */ arg filename if ~exists(filename)|filename='' then do say 'Unable to find the file' say 'See Ya.......' say '' exit end /* ---- Keep on going until there's no more .NEW ---- */ /* -------------------------------------------------- */ newpos=1 do until newpos=0 newpos=lastpos('.NEW',filename) if newpos=(length(filename)-3) then do dest=delstr(filename,newpos) if exists(dest) then do say 'removing 'dest doscommand='delete >NIL: 'dest address COMMAND doscommand end doscommand='rename 'filename' as 'dest filename=dest address COMMAND doscommand end end exit