This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
folder.rename( )

folder.rename( ) 


 

folder.rename ( newName ) -> Result 
Parameter Type   Description
newName  Text in New full name for the folder
Result  Object in Renamed folder

The folder.rename( ) method renames the folder with the name you passed in newName and returns the renamed Folder object. 

The newName parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a folder with the same name already exists, an error is returned. 

Returned object

The method returns the renamed Folder object.

Example  

 C_OBJECT($toRename)
 $toRename:=Folder("/RESOURCES/Pictures").rename("Images")

 
PROPERTIES 

Product: 4D
Theme: File and Folder

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R5

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)