home *** CD-ROM | disk | FTP | other *** search
- /*
- * RenameForFrameStore.ifx
- * Written by Thomas Krehbiel
- *
- * Rename frames to be Toaster compatible.
- *
- * Inputs:
- * Word(Arg(1),1) = Frame number (1 - N)
- * Word(Arg(1),2) = Main filename ("-" if not specified)
- * Word(Arg(1),3) = Swap filename ("-" if not specified)
- * Word(Arg(1),4) = Sequence number (?)
- * Word(Arg(1),5) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- */
-
- OPTIONS RESULTS
-
- framenum = Word(Arg(1),1)
- fullpath = Word(Arg(1),2)
-
- i = LASTPOS(fullpath,'/')
- IF i = 0 THEN i = LASTPOS(fullpath,':')
- IF i > 0 THEN DO
- file = SUBSTR(fullpath,i+1)
- path = LEFT(fullpath,i)
- END
- ELSE DO
- file = fullpath
- path = ""
- END
-
- newfilename = path||RIGHT('000'||framenum,3)||'.FS.'file
-
- ADDRESS COMMAND 'Copy CLONE' fullpath newfilename
-
- EXIT
-