How to rename Folder by delphi

Hi Experts!

I want to rename folder and if there is exist, will combine it together
Can someone give me and idea?

THanks
xtrueAsked:
Who is Participating?
 
saravananvgCommented:
Hello sir,

  if DirectoryExists(Path of the folder) then
    RenameFile(oldpathof the folder,newpath of the folder);


for eg

  if DirectoryExists('C:\avi') then
   RenameFile('C:\avi','C:\avi1');



with regards,
padmaja.
0
 
xtrueAuthor Commented:
Thanks padmaja

But this still not worked if there the same name of directory exists
I wish to move all file in my Dir to new Dir together..

Thanks again for your help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.