Instructie Name

Hernoemt een bestaand bestand of bestaande map.

Syntaxis:


Name OudeNaam As String As NieuweNaam As String

Parameters:

OudeNaam, NieuweNaam: Elke tekenreeks die de bestandsnaam specificeert, met inbegrip van het pad. De URL-notatiekan hier ook worden gebruikt.

Voorbeeld:


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 "Bestand bestaat reeds"
End If
End
End Sub

Help ons, alstublieft!