Name Statement/text/sbasic/shared/03020412.xhpName statementName StatementRenames an existing file or directory.Syntax:Name OldName As String As NewName As StringParameters:OldName, NewName: Any string expression that specifies the file name, including the path. You can also use URL notation.see #i61074Example:Sub ExampleReNameOn Error GoTo ErrorFileCopy "c:\autoexec.bat", "c:\temp\autoexec.sav"Name "c:\temp\autoexec.sav" As "c:\temp\autoexec.bat"EndError:If err = 58 Then MsgBox "File already exists"End IfEndEnd Sub