Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.computer > #10078

Re: OT?: Excel folder delete problem

From Robert Baer <robertbaer@localnet.com>
Newsgroups alt.computer
Subject Re: OT?: Excel folder delete problem
References <HpRKz.12885$KB2.2933@fx13.iad> <6h7253a77l2$.1sr9nmoxili2v.dlg@40tude.net> <uvkMz.69572$PD2.48490@fx42.iad> <17u0hjdg0keqv.17aopaul2a1ad.dlg@40tude.net>
Message-ID <FT6Nz.49756$6D2.28530@fx08.iad> (permalink)
Date 2016-10-17 09:20 -0800

Show all headers | View raw


JJ wrote:
> On Sat, 15 Oct 2016 00:01:44 -0800, Robert Baer wrote:
>>> The "On Error Resume Next" does *not* bypass file access error or for any
>>> file I/O to succeed. It simply disable the exception generator (where it
>>> terminates the program due to error). So, when RmDir fails, the execution
>>> simply proceed to the next statement. The error should be checked after any
>>> file I/O statement. i.e. check the Err.Number value.
>> * The "On Error Resume Next" was added before the RmDir to prevent the
>> program from crashing with error message "Path/File access error".
>>     The RmDir simply does not work.
>
> That's because one of the two reasons I've already mentioned, or the folder
> does not exist.
* The folder(s) in question obviously exist; if they did not,then i 
would not have to delete them.

>
>>     Thanks for the try; if you can think of something crazy that will
>> allow removal/deletion please do not hesitate.
>
> Try checking the folder programmatically, before deleting it. Check the
> result of the RmDir and show a message dialog if it fails (message contents
> doesn't matter). When the message dialog is shown, it'll pause the program
> (the Excel script). Open Microsoft Process Explorer (download it if you
> don't have it) then find which process is using the folder that can't be
> deleted. i.e. from main menu: Find>  Find Handle or DLL; then input the
> folder full path name.
* So, you are saying i should allow the dialog box and jump thru these 
hoops EVERY time when there are hundreds?
   That is what a PROGRAM is for,to automate things - to solve problems, 
not create them.

*I would rather let them pile up until the program stops with the 
message box "disk full" - a LIE when there are GigaBytes available.

* Also, as i said, i know EXACTLY where they are, and i can manually 
delete them as the program runs.

*It makes absolutely NO SENSE that the RmDir does not work here; but 
then again,the "no sense" is typical MicroSuck.


   Thanks.

Back to alt.computer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

OT?: Excel folder delete problem Robert Baer <robertbaer@localnet.com> - 2016-10-10 11:50 -0800
  Re: OT?: Excel folder delete problem JJ <jj4public@vfemail.net> - 2016-10-11 19:14 +0700
    Re: OT?: Excel folder delete problem Robert Baer <robertbaer@localnet.com> - 2016-10-15 00:01 -0800
      Re: OT?: Excel folder delete problem JJ <jj4public@vfemail.net> - 2016-10-15 18:21 +0700
        Re: OT?: Excel folder delete problem Robert Baer <robertbaer@localnet.com> - 2016-10-17 09:20 -0800
          Re: OT?: Excel folder delete problem Paul <nospam@needed.invalid> - 2016-10-17 14:59 -0400
            Re: OT?: Excel folder delete problem Robert Baer <robertbaer@localnet.com> - 2016-10-19 11:43 -0800

csiph-web