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!
|