Name Statement

Premenuje existujúci súbor alebo priečinok.

Syntax:


Name OldName As String As NewName As String

Paremetre:

OldName, NewName: Reťazce určujúce názov súboru, vrátane cesty. Tiež je možné použiť URL notáciu .

Príklad:


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 "Súbor už existuje"
End If
End
End Sub

Please support us!