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

Home » Public Forums » archive » spawn
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: spawn [message #89196 is a reply to message #89173] Fri, 01 August 2014 01:35 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den onsdagen den 30:e juli 2014 kl. 19:28:54 UTC+2 skrev Gompie:
> Hi
>
> Can anyone help me with my spawn comand.
>
> I wish to copy a files iteratively by first storing filenames and path as
>
>
>
> f=file_search('*.nc')
>
> and then copy
>
> to
>
> g=/home/mark/matchup/MIRS_AMSU
>
>
>
> by using a spawn command in idl.
>
>
>
> But I get syntax error.
>
> Any help.
>
> GlanPlon.

You don't tell us the spawn command you tried, so I can't say what causes your syntax error. (Unless you didn't get that far because you really did write the g=/home/mark/matchup/MIRS_AMSU line as above, without quotes.)

Anyway, something like the following should do it (untested):

g='/home/mark/matchup/MIRS_AMSU'
f=file_search('*.nc',count=nfiles)
if nfiles gt 0 then begin
flist = join(f,' ')
spawn, 'mv ' + strjoin(f,' ') + g
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL stop reading file after 200 files
Next Topic: How to make Box-Whisker plot with log-log scale?

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

Current Time: Wed Oct 08 15:27:33 PDT 2025

Total time taken to generate the page: 0.00649 seconds