C9VzB‖Name Statement

Contents
XWCj5‖

# G2wMY‖Name Statement

H2NFb‖Renames an existing file or directory.

## Hdf54‖Syntax:

    AUhBt‖Name OldName As String As NewName As String

## 7AwQo‖Parameters:

FSn8b‖ OldName, NewName: Any string expression that specifies the file name, including the path. You can also use URL notation.

## CLjrW‖Example:

    Sub ExampleReName
    On Error GoTo Error
    FileCopy "c:\autoexec.bat", "c:\temp\autoexec.sav"
    Name "c:\temp\autoexec.sav" As "c:\temp\autoexec.bat"
    End
    Error:
    If err = 58 Then
    sDFnj‖    MsgBox "File already exists"
    End If
    End
    End Sub

Please support us!