file in use by another program [message #88097] |
Wed, 19 March 2014 19:11  |
wallabadah
Messages: 28 Registered: November 2005
|
Junior Member |
|
|
Hi All,
I have an IDL program that needs to read a csv file of data generated elsewhere on the network. Until recently the file was generated after the data collection was complete, but now the file is generated on the fly over several minutes. My IDL program is having a hard time with this! It's now loading the data file before it's complete, and sometimes before it contains any data at all.
I'd like to know if there's an IDL way of determining if file is still open and in use by another program. I've looked at file_test(), but none of the available flags provide this information.
any suggestions would be appreciated,
Will.
|
|
|
Re: file in use by another program [message #88098 is a reply to message #88097] |
Wed, 19 March 2014 22:03   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Wednesday, March 19, 2014 10:11:40 PM UTC-4, wallabadah wrote:
> Hi All,
>
>
>
> I have an IDL program that needs to read a csv file of data generated elsewhere on the network. Until recently the file was generated after the data collection was complete, but now the file is generated on the fly over several minutes. My IDL program is having a hard time with this! It's now loading the data file before it's complete, and sometimes before it contains any data at all.
>
>
>
> I'd like to know if there's an IDL way of determining if file is still open and in use by another program. I've looked at file_test(), but none of the available flags provide this information.
>
>
>
> any suggestions would be appreciated,
Use two files. One file contains the data. The other file is only created after the first file is complete. Then by monitoring the signal file, your IDL code will know when it's safe to read the data file.
|
|
|
|
Re: file in use by another program [message #88137 is a reply to message #88098] |
Sun, 23 March 2014 15:36  |
ccfsgau
Messages: 1 Registered: March 2014
|
Junior Member |
|
|
> Use two files. One file contains the data. The other file is only created after the first file is complete. Then by monitoring the signal file, your IDL code will know when it's safe to read the data file.
The file is created by a non-IDL program I don't have access to. Interestingly, if I open the file in Excel, it tells me that the file is in use by another program... so there must be some sort of file-system flag. If only IDL could detect it...
|
|
|