comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: copying a file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: copying a file [message #27231] Tue, 16 October 2001 06:08 Go to next message
Paul van Delst is currently offline  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
Re: copying a file [message #27232 is a reply to message #27231] Tue, 16 October 2001 05:54 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
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?
>

Do you speak from ASCII files ?

Reimar
--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
Re: copying a file [message #27295 is a reply to message #27232] Wed, 17 October 2001 00:00 Go to previous messageGo to next message
Miguel Ángel Córd is currently offline  Miguel Ángel Córd
Messages: 11
Registered: March 2000
Junior Member
Reimar Bauer wrote:

> 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?
>>
>
> Do you speak from ASCII files ?

It's a RAW file.

I will use the file-copy routine of Mark.

Thanx a lot.

--
+- - - - - - - - - - - - - - - - - - - - - - - -+
| Miguel Angel C�rdoba |
| |
| http://campus.uab.es/~2034008 |
| |
| Grup de Modelitzaci� Hidrometeorol�gica (UPC) |
| (http://www.upc.es/ehma/gmh) |
+- - - - - - - - - - - - - - - - - - - - - - - -+
Re: copying a file [message #27315 is a reply to message #27231] Tue, 16 October 2001 13:16 Go to previous messageGo to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
From: "Paul van Delst" <paul.vandelst@noaa.gov>
> Miguel �ngel C�rdoba wrote:
>> 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 without
>> the spawn command?
>
> It is curious there's a FILE_DELETE IDL command, but no file copy? Huh.

Yes, it's curious.

I have a file-copy routine that reads & writes a file using IDL commands

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/mgh_fi le_copy.pro

It requires IDL 5.4. For IDL 5.3 there's

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl53/mgh_ file_copy.pro

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research




--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
Re: copying a file [message #27370 is a reply to message #27295] Wed, 17 October 2001 13:36 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
From: "Miguel �ngel C�rdoba" <cordoba@ehma.upc.es>
> It's a RAW file.
>
> I will use the file-copy routine of Mark.

Oops. There was a bug in MGH_FILE_COPY. Just a small thing really: it had
"while eof(lun)" where it should have had "while not eof(lun)".

Thanks to Miguel for finding it.

It's fixed now.

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research




--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: RSI Platform Support Announcement
Next Topic: Time series with 75% missing observations

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:12:16 PDT 2025

Total time taken to generate the page: 0.00661 seconds