Re: copying a file [message #27231] |
Tue, 16 October 2001 06:08  |
Paul van Delst
Messages: 364 Registered: March 1997
|
Senior Member |
|
|
Miguel �ngel C�rdoba wrote:
>
> hello,
> How can I copy a file in a multimplatform application with IDL?.
> I want to copy a file in linux and in windows. Can I do it whithout
> the spanw command?
It is curious there's a FILE_DELETE IDL command, but no file copy? Huh.
How about:
CASE ( STRUPCASE( !VERSION.OS_FAMILY ) ) OF
'UNIX': SPAWN, 'cp ' + from_file + ' ' + to_file
'MACOS': SPAWN, <whatever the Mac command is>
'WIN': SPAWN, <whatever the Windows command is>
'VMS': SPAWN, <whatever the VMS command is>
ELSE: 'IDL on PDP 11/70 is no longer supported :o)'
ENDCASE
Of course the non-unix results for !VERSION.OS_FAMILY above are made up. :o)
paulv
--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
|
|
|
|
|
|
|