Can't rename a folder
- From: clinisbut <clinisbut@xxxxxxxxx>
- Date: Fri, 28 Mar 2008 01:56:47 -0700 (PDT)
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.
.
- Follow-Ups:
- Re: Can't rename a folder
- From: clinisbut
- Re: Can't rename a folder
- Prev by Date: Re: write a comment to a file
- Next by Date: Re: Can't rename a folder
- Previous by thread: Re: write a comment to a file
- Next by thread: Re: Can't rename a folder
- Index(es):
Relevant Pages
|