Name Statement

κΈ°μ‘΄ 파일 λ˜λŠ” λ””λ ‰ν† λ¦¬μ˜ 이름을 λ°”κΏ‰λ‹ˆλ‹€.

ꡬ문:


Name OldName As String As NewName As String

맀개 λ³€μˆ˜:

OldName, NewName: 경둜λ₯Ό ν¬ν•¨ν•œ 파일 이름을 μ§€μ •ν•˜λŠ” μž„μ˜μ˜ λ¬Έμžμ—΄ μ‹μž…λ‹ˆλ‹€. 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