Name Statement

Renames an existing file or directory.

āļšāˇāļģāļš āļģāˇ“āļ­āˇ’āļē:


Name OldName As String As NewName As String

āļ´āļģāˇāļ¸āˇ’āļ­āˇ“āļąāˇŠ:

File: āļąāˇ’āˇāˇŠāˇ€āļ­ āļœāˇœāļąāˇ” āļ´āˇ’āļģāˇ’āˇ€āˇ’āļ­āļģāļēāļšāˇŠ āļ‡āļ­āˇ’ āļ•āļąāˇ‘āļ¸ āļ­āļąāˇŠāļ­āˇ” āļ´āˇŠâ€āļģāļšāˇāˇāļąāļēāļšāˇŠ. āļ”āļļāļ§ URL āļ…āļ‚āļšāļąāļē āļˇāˇāˇ€āˇ’āļ­āˇ āļšāˇ’āļģāˇ“āļ¸āļ¯ āļšāļŊ āˇ„āˇāļš.

āļ‹āļ¯āˇāˇ„āļģāļĢāļē:


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
    MsgBox "File already exists"
End If
End
End Sub

Please support us!