;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; NAME: cp ; ; PURPOSE: copy files ; ; CATEGORY: commande unix ; ; CALLING SEQUENCE: cp, filenamein, filenameout ; ; INPUTS:filenamein, filenameout: 2 strings. ; ; KEYWORD PARAMETERS: ; ; OUTPUTS: ; ; COMMON BLOCKS: ; ; SIDE EFFECTS: ; ; RESTRICTIONS: ; ; EXAMPLE: ; ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) ; ;- ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ PRO cp, filenamein, filenameout ; if size(filenamein, /type) NE 7 then begin rien = report('filenamein must be a string') return endif if size(filenameout, /type) NE 7 then begin rien = report('filenameout must be a string') return endif ; thisOS = strupcase(strmid(!version.os_family, 0, 3)) if thisOS eq 'MAC' or thisOS eq 'WIN' then begin text = getfile(filenamein) putfile, filenameout, text ENDIF ELSE spawn, 'cp '+filenamein+' '+filenameout return end