Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Misc > Can't rename a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 6026 of 6154
Post > Topic >>

Can't rename a folder

by clinisbut <clinisbut@[EMAIL PROTECTED] > Mar 28, 2008 at 01:56 AM

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.
 




 4 Posts in Topic:
Can't rename a folder
clinisbut <clinisbut@[  2008-03-28 01:56:47 
Re: Can't rename a folder
clinisbut <clinisbut@[  2008-03-28 02:40:42 
Re: Can't rename a folder
"Maarten Wiltink&quo  2008-03-28 11:17:28 
Re: Can't rename a folder
clinisbut <clinisbut@[  2008-03-28 04:02:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 20:15:33 CDT 2008.