X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 08 Dec 2006 01:23 PM by  anon
Removing/deleting EVF files
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:25
New Member


--
08 Dec 2006 01:23 PM
    I am writing a program that extracts a large amount of vector data, but I don't need to save all of it to disk nor does it need to be automatically loaded in the ENVI software ( i.e., into the Available Vectors list). I am looking to do something like: envi_file_mng, id=evf_id, /delete, /remove for evf files. The above line, of course, does not work for evf files, but if you are familiar with this command it is the sort of behavior I would like to emulate.

    Deleted User



    New Member


    Posts:
    New Member


    --
    08 Dec 2006 01:23 PM
    Well, there really isn't a vector equivalent of envi_file_mng. Here's something that could work. Let's say you have an EVF file called "test.evf", which is currently open and has an evf_id. To remove and delete it, you could try the following: ;Close the EVF file envi_evf_close, evf_id ;String path to file you want to delete (the same string you used when you originally created the file ;using ENVI_EVF_DEFINE_INIT). I'm hard-coding it here, but it might already be a string variable. evf_file = 'c:\test_folder\test.evf' ;Create a string path for the associated DBF file--if there is one dbf_path = file_dirname(evf_file, /mark_directory) dbf_base = file_basename(evf_file, '.evf') dbf_file = dbf_path+dbf_base+'.dbf' ;Delete the EVF and DBF files file_delete, evf_file file_delete, dbf_file You can ignore the path building stuff and the file_delete for the DBF if you only have an EVF file. In that case, skip right to file_delete, evf_file.
    You are not authorized to post a reply.