X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 29 Mar 2011 12:22 PM by  anon
Using spawn command with variables
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
29 Mar 2011 12:22 PM
    Hi, I am interested in using the spawn command in IDL to search for a list of files and store them in a variable. Something like: spawn, ['find /Volumes/folder1/*.lc'], sourcefiles will store all of the file paths in an array sourcefiles, which I can access individually. Is there a way to use the spawn command with a idl/unix variable storing the path, such as: path='/Volumes/folder1/*.lc' spawn, ['find' path], sourcefiles. I'm trying to do this so I can easily parse the file paths for individual files. Thanks in advance!

    Deleted User



    New Member


    Posts:
    New Member


    --
    31 Mar 2011 08:24 AM
    Hi, I don't know, but you may have a look on 'filesearch' and 'file_basename' functions ? anyway to answer your question you could do this. path='/Volumes/folder1/*.lc' str = string(path, format='(" find ", a) spawn, str, sourcesfiles vincent
    You are not authorized to post a reply.