Archive: Rename Folder


Rename Folder
How do I rename a folder? Situation is this, I need to copy my folder over but I want to rename the old folder to something like folder.old just for my reference..

Cheers.


I am using the system plugin to do that:

System::Call 'kernel32::MoveFile(t "<Full_Path_of_Folder_to_rename>", t "<Full_Path_of_Folder_to_rename>.old")i r0'
Note that $0 will be 0 if the call fails. You may want to look at MoveFileEx for more advanced features.
Hope this helps
CF

Hi CF!

What's the advantage of your function compared to NSIS' Rename ?

Rename:

http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.6

Thanks!

Cheers

Bruno


None, I guess :)
CF


after reading the replies I have discovered that I missed out that short single bit of text which mentioned the RENAME function includes directories too.

dots..

Thanks guys for the help.