comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Problem while deleting shape file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Problem while deleting shape file [message #56317] Thu, 11 October 2007 04:45
raval.chintan is currently offline  raval.chintan
Messages: 54
Registered: May 2005
Member
Hi,

I have written one program in which I am processing one shape file.
Once I process it I want to delete the shape file from physical
memory. for that I have written a below example program.


PRO ex_shapefile


file = dialog_pickfile()



; Open the states Shapefile in the examples directory.
myshape=OBJ_NEW('IDLffShape', file)

; Get the number of entities so we can parse through them.
myshape->GetProperty, N_ENTITIES=num_ent

; Read all the entities.
FOR x=1, (num_ent-1) DO BEGIN
;Read the entity x
ent = myshape->GetEntity(x)
;Clean-up of pointers

myshape->DestroyEntity, ent
ENDFOR

; Though next statement is not required because I have open my shape
file in read only mode

myshape->Close


; Close the Shapefile.
OBJ_DESTROY, myshape



; My Process

;Delete shape file Problem is over here.
; though I have close the file I have destroy the object then also not
able to delete the file


file_delete,file

END




Now my problem is whenever I am deleting the file through file_delete
procedure , IDL is giving me error permission denied. I am having all
the rights for a folder in which this file is available.

That means IDL is not allowing me to delete the above file .... :-
( ... Is it a bug in IDL? Kindly correct me if I am wrong.


Regards
Chintan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Bug in SWITCH - ELSE: statement?
Next Topic: Re: character class conversions

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 21:36:57 PDT 2025

Total time taken to generate the page: 1.67916 seconds