home *** CD-ROM | disk | FTP | other *** search
- /*
- ----------------------------------------------------------------------------
- Name To Anim Sequence
- Filenames with the extension .1, .10, .100, .1000
- and with the extra extension of .image
- Will be renamed with the extension: .0001, .0010, .0100, .1000
-
- Host address: COMMAND
- Written by Jan Van Overbeke, 3-DEE, ©1993.
- Read the AREXX-Scripti doc, for more info about operation and rights!
- ----------------------------------------------------------------------------
- */
-
- arg source
- dest=source
- if ~exists(dest)|source='' then do
- say 'Unable to find file !!'
- say 'Please come again.'
- say ''
- exit
- end
-
- extonepos=lastpos('.IMAGE',dest)
- if extonepos=length(dest)-5 then do
- dest=delstr(dest,extonepos)
- say 'Renaming: 'source
- say 'as: 'dest
- say ''
- doscommand='rename 'source' as 'dest
- address COMMAND doscommand
- exit
- end
-
- exttwopos = lastpos('.',dest)
- if ~exttwopos<length(dest)-5) then do
- extnumber=right(dest,length(dest)-exttwopos)
- if (extnumber<0)|(extnumber>9999) then do
- say 'Invalid filename: Wrong extension !!'
- say 'See Ya...'
- say ''
- exit
- end
- dest=delstr(dest,exttwopos+1)||extnumber
- say 'Renaming: 'source
- say 'as: 'dest
- say ''
- doscommand='rename >NIL: 'source' as 'dest
- address COMMAND doscommand
- exit
- end
-
- say 'Extension too large !!!!'
- say 'Cannot rename filenames with extensions longer than 4 !'
- say 'See Ya...'
- say ''
- exit
-