###User Defined Function###
_FO_FileDirReName

###Description###
Renames a file or directory.

###Syntax###
#Include <FileOperations.au3>
_FO_FileDirReName ( $sSource, $sNewName [, $iFlag=0 [, $DelAttrib=0 [, $iDir=-1]]] )

###Parameters###
@@ParamTable@@
$sSource
	The full path of the directory or file
$sNewName
	The new name
$iFlag
	[optional] Flag to overwrite existing
		0 - (default) do not overwrite existing file/directory
		1 - overwrite the existing file (if the directory already exists, it will be deleted)
$DelAttrib
	[optional] Remove the attributes (-RST), if it is not possible to remove a file/directory
		0 - (default) do not remove the attributes
		1 - remove attributes
$iDir
	[optional] Specifies what is $sSource 
		-1 - (by default) auto detection
		0 - file
		1 - directory
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	Returns 1.
Failure:	Returns 0 and sets @error:
@error:	0 - No error
	1 - FileMove or DirMove failure
	2 - $sNewName - an empty string
	3 - $sSource - file/directory at the specified path does not exist
	4 - the original and new name are the same
	5 - $sNewName - contains invalid characters
@@End@@

###Remarks###
If you use $iFlag = 1, and a new file/directory with the same name exists, it will be removed, i.e. will not merge directories. Renaming is case sensitive.

###Related###
None.

###Example###
@@IncludeExample@@