MSI Factory 2.3

Folder.Rename

Folder.Rename

This is the first topic This is the last topic  

Folder.Rename

This is the first topic This is the last topic  

OverviewExamples

Folder.Rename (

string OldName,

string NewName )

Example 1

Folder.Rename("C:\\Stored", "C:\\OldStored");

Renames the folder located at "C:\Stored" to "C:\OldStored."

Example 2

Folder.Rename(_SourceDrive .."\\MyApplicationData", _SourceDrive .."\\MyApplicationDataBK");

Renames the "MyApplicationData" folder to "MyApplicationDataBK."

Example 3

-- Renames a current folder.

Folder.Rename("C:\\My Folder", "C:\\My New Folder");

 

-- Get the error code for the rename action.

error = Application.GetLastError();

 

-- If an error occurred, display the error message.

if (error ~= 0) then

   Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);

end

Renames "My Folder"  to "My New Folder" and displays an error message if the action fails.

See also: Related Actions


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us