Re: Can't rename a folder



"clinisbut" <clinisbut@xxxxxxxxx> wrote in message
news:be32e0fe-3f4b-4ec8-bcd2-70d1c90ebdd5@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 28, 9:56 am, clinisbut <clinis...@xxxxxxxxx> wrote:

I'm trying to rename a folder with
RenameFile( old_name, new_name );

But it's throwing an error 32 (file/folder already in use).

Some process has the directory as its current directory.


I suspect the error comes from a TOpenDialog.
[...]
This works ok, but after that I'm not able to modify any file/folder
element inside folder selected by user.
[...]
I'm not able to change folder's name not even from windows explorer
(after using TOpenDialog); when my program exits then I can.

Nevermind, I solve the problem adding the option: ofNoChangeDir

There you go.

Note that while you have control over your own process, you can't
guarantee that some other process won't be sitting on your directory.

Groetjes,
Maarten Wiltink


.