home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / graphic / utilities / pegger / rexx / copy_source.peg < prev    next >
Text File  |  1995-07-10  |  723b  |  24 lines

  1. /* PEGGER ARexx Script to copy the source file before processing */
  2. /* You need to specify the directory where you want the file to  */
  3. /* go including the trailing '/' if needed in the variable copyto */
  4.  
  5. copyto = "WORK:"
  6.  
  7. /*    And now we can get the source file name and destination file name */
  8. /* For CJPEG the source is an image file, and the destination the JPEG file */
  9. /* For DJPEG the source is the JPEG file, and the destination is the image file */
  10.  
  11. arg source,dest
  12.  
  13. last = LASTPOS( "/",source )
  14.  
  15. if( last == 0 ) then do
  16.     last = LASTPOS( ":",source )
  17.     end
  18. if( last > 0 ) then do
  19.     last = last + 1
  20.     file = SUBSTR( source, last )
  21.     say 'File: ' || file
  22.     ADDRESS COMMAND 'copy ' || source || ' ' || copyto || file
  23.     end
  24.