Istruzione Name

Rinomina un file o una cartella esistente.

Sintassi:

Name OldName As String As NewName As String

Parametri:

OldName (VecchioNome), NewName (NuovoNome): Stringa che specifica il nome del file, incluso il percorso. In alternativa, potete usare unanotazione URL.

Esempio:

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 "Il file esiste già"

End If

End

End Sub