Name-udtryk

Omdøber en eksisterende fil eller katalog.

Syntaks:


Name OldName As String As NewName As String

Parametre:

OldName, NewName: Ethvert strengudtryk, der angiver filnavnet, inklusiv stien. Du kan også bruge URL-notation.

Eksempel:


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 "Filen findes allerede"
End If
End
End Sub

Støt os venligst!