Problems deleting folders on Vista - error #?

Jim Bufalini jim at visitrieve.com
Sun Feb 15 16:49:12 EST 2009


Hi Tiemo,

> Hello Jim and others
> by time I found the error code (32) of the revdeletefolder and it says:
> 32: ERROR_SHARING_VIOLATION - one of the files inside the directory
> probably
> was opened without FILE_SHARE_DELETE specified.
> What puzzles me. I created this folder and another folder inside, so I
> have
> all rights on those folders. Now I try to delete them in a recursive
> loop
> from inside folders to the upper folder. All lower folders are deleted
> without problems, so the upper folder is definatly empty at this time.
> Obviously my deleting from lower to upper folder is too fast for
> windows, so
> that it "thinks" there are still open files, thought there are none.
> Can
> that be?

Definitely can.

> Any idea for a workaround?
> Thank you

Yes. Create a small command that just deletes a file or folder passed to it.
Then, in your repeat loop use a *send "<your command name>" && "<your file
and/or folder path>" to me in 5 milliseconds* Make sure to use the in-time
form. What this will do will cause the sends to not be executed until both
the repeat loop and handler that has the repeat exits. This allows both the
rev engine and OS to do their work in between each delete (or create). You
may even be able to use 0 milliseconds for this. But don't use waits in the
repeat. All that will do is slow up the repeat loop and not solve the issue.

Jim Bufalini




More information about the use-livecode mailing list