bjames
asked on
Renaming a Folder
What is the procedure for renaming a folder (directory) using Delphi code? Do I have to create a new folder, move the files and then delete the old folder? Or can I simply rename a folder?
I have been looking through the help files but I am not having any luck.
Thanks
I have been looking through the help files but I am not having any luck.
Thanks
huh ?
simply use RenameFile(OldDirName, NewDirName);
works :)
simply use RenameFile(OldDirName, NewDirName);
works :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect! Exactly what I needed.
Thanks
Thanks
Something like this:
While Not ALL_DONE Do Begin
MkDir(DestinationFolders);
CopyFile(SourceFile, TargetFile);
If CopyOk Then
DeleteFile(SourceFile);
End;
Regards
//raidos