Board index » delphi » RemoveDir question

RemoveDir question

I am trying to write a routine that requires me to remove a specified
folder. I've tried RemoveDir and rmdir functions. RemoveDir alsways returns
false, and rmdir returns I/o error 32 (which I can't find in the i/o error
list BTW). The folder is empty. What could I be doing wrong?

Thanks, Brian

 

Re:RemoveDir question


Quote
Brian Dumas wrote:
> I am trying to write a routine that requires me to remove a specified
> folder. I've tried RemoveDir and rmdir functions. RemoveDir alsways returns
> false, and rmdir returns I/o error 32 (which I can't find in the i/o error
> list BTW). The folder is empty. What could I be doing wrong?

You have some other program that locks the folder.

For example you did 'CD \folder' on a command line.

Close any suspicious programs.

Juha

Re:RemoveDir question


Is the directory on a server?
Could there be any rights issues?
Can you delete the directory from Explorer or DOS?

Quote
"Brian Dumas" <br...@kvdco.com> wrote in message news:3c7fd2bd$1_2@dnews...
> I am trying to write a routine that requires me to remove a specified
> folder. I've tried RemoveDir and rmdir functions. RemoveDir alsways
returns
> false, and rmdir returns I/o error 32 (which I can't find in the i/o error
> list BTW). The folder is empty. What could I be doing wrong?

> Thanks, Brian

Re:RemoveDir question


Quote
In article <3c7fd2bd$1_2@dnews>, Brian Dumas wrote:
> I am trying to write a routine that requires me to remove a specified
> folder. I've tried RemoveDir and rmdir functions. RemoveDir alsways returns
> false, and rmdir returns I/o error 32 (which I can't find in the i/o error
> list BTW).

Errors you cannot find in the Delphi online help are usually API errors.
Which you can find in win32.hlp, look for "error codes" as the topic.
32 is a sharing violation. As Juha explains this means that the directory is
currently used. It may be your own program that does that, if its current
directory is set to the one you try to delete that would fail.

--
Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be

Other Threads