X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 19 Aug 2009 02:52 AM by  anon
ENVI_OPEN_DATA_FILE,/MODIS
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
19 Aug 2009 02:52 AM
    I have opened a MODIS data file (HDF format) with ENVI_OPEN_DATA_FILE,/MODIS. When I want to close and delete it, it says "Permission denied". I don't know why. Could you help me? The pro code is as follows: Pro test   fname='D:\MOD021KM.A2008291.0420.005.2009175164914.hdf'   ENVI_OPEN_DATA_FILE, fname ,/MODIS, r_fid=fid   fids = ENVI_GET_FILE_IDS()   For t = 0, n_elements(fids) - 1 do begin     ENVI_FILE_MNG, id=fids[t], /remove   Endfor   file_delete,fname End I know if I open the file with ENVI_OPEN_DATA_FILE, /HDF_SD, that will be successful. But I still want to know why it is failed when I use ENVI_OPEN_DATA_FILE, /MODIS. Thank you very much!

    Deleted User



    New Member


    Posts:
    New Member


    --
    19 Aug 2009 09:04 AM
    I actually do not know the answer to your question, but i do have a suggestion.  The ENVI_FILE_MNG command has a /delete keyword that will actually delete the file, so you can do the deleting in the same line as you close it.
    You are not authorized to post a reply.