home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / tagbet.zip / COPYFILE.CMD < prev    next >
OS/2 REXX Batch file  |  1995-03-12  |  720b  |  34 lines

  1. /*Copies files to local Copy-Directory (define in filepath.cfg)*/
  2. arg com node filelist
  3.  
  4. call readpaths
  5.  
  6. line=linein(filelist)
  7. do while line<>""
  8.   fname=word(line,1)
  9.   name=filespec("name",fname)
  10.   "copy "fname" "copypath"\"name
  11.   line=linein(filelist)
  12. end
  13. rc=lineout(filelist)
  14. exit
  15.  
  16. /**************************/
  17. readpaths:
  18.   pathfile="FILEPATH.CFG"
  19.   copypath="c:\copy"
  20.   do while lines(pathfile)
  21.     pathfileline=linein(pathfile)
  22.     pathfilekeyword=translate(word(pathfileline,1))
  23.     pathfileinfo=word(pathfileline,2)
  24.     select
  25.       when pathfilekeyword="COPYDIR" then do
  26.           copypath=pathfileinfo
  27.         end
  28.       otherwise
  29.     end
  30.   end
  31.   rc=lineout(pathfile)
  32.   return 0
  33.  
  34.