home *** CD-ROM | disk | FTP | other *** search
- /* PEGGER ARexx Script to move the destination file after processing */
-
- /* Primarily for SNOOP CJPEG where the final destination for the JPEG */
- /* is across a network so that your renderer saves the image locally */
- /* and after PEGGER does a SNOOP compress of the image with REPLACE it */
- /* moves the JPEG to the final destination on the network and deletes */
- /* the JPEG of the original image on the local system. */
-
- /* You need to specify the directory where you want the file to */
- /* go including the trailing '/' if needed in the variable copyto */
-
- copyto = "WORK:"
-
- /* And now we can get the source file name and destination file name */
- /* For CJPEG the source is an image file, and the destination the JPEG file */
- /* For DJPEG the source is the JPEG file, and the destination is the image file */
-
- arg source,dest
-
- /* Get the position in the destination file name path of the file name */
- last = LASTPOS( "/",dest )
-
- if( last == 0 ) then do
- last = LASTPOS( ":",dest )
- end
-
- if( last > 0 ) then do
- /* Get the filename */
- last = last + 1
- file = SUBSTR( dest, last )
- /* Copy the JPEG file to its final destination */
- ADDRESS COMMAND 'copy ' || dest || ' ' || copyto || file
- if( RC == 0 )then do
- /* If the copy suceeded, delete the JPEG of the original image */
- ADDRESS COMMAND 'delete ' || dest
- end
- end
-