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).
I checked both paths and are correct.
I suspect the error comes from a TOpenDialog.
This TOpenDialog asks the user to open a file:
openDialog:= TOpenDialog.Create( nil );
openDialog.InitialDir := Dir + 'projects';
openDialog.Filter := 'XML files|*.xml|All files|*.*';
openDialog.Title := 'Select a file project';
openDialog.Options := [ofReadOnly];
//Display openDialog
if openDialog.Execute then
load_project_info( openDialog.FileName )
openDialog.free;
This works ok, but after that I'm not able to modify any file/folder
element inside folder selected by user.
load_project_info loads some data from file selected, but this is not
the problem 'cause I try to comment this line and the error persists.
I'm not able to change folder's name not even from windows explorer
(after using TOpenDialog); when my program exits then I can.