Renaming files

Posts 1–3 of 3 · Page 1 of 1
Renaming files
Code:
Private Sub NetButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NetButton1.Click
        If TextBox1.Text = "pokemon" Then
          
            Try
                My.Computer.FileSystem.RenameFile("C:\Nexon\Combat Arms\Game\GUNS_M_HH.rez", "GUNS_M_HH.rez.old")
                My.Computer.FileSystem.RenameFile("C:\Nexon\Combat Arms\Game\GUNS_SND_SG.rez", "GUNS_SND_SG.rez.old")
                My.Computer.FileSystem.RenameFile("C:\Nexon\Combat Arms\Game\GUNS_T_HH.rez", "GUNS_T_HH.rez.old")
                My.Computer.FileSystem.RenameFile("C:\Nexon\Combat Arms\Game\GUNS_M_PV_SG.rez", "GUNS_M_PV_SG.rez.old")
                My.Computer.FileSystem.RenameFile("C:\Nexon\Combat Arms\Game\UI_HUD_WeaponInfo.rez", "UI_HUD_WeaponInfo.rez.old")

            Catch ex As Exception
                MsgBox("Failed to Rename")
            End Try
however, i always get failed to rename, and it doesn't rename help pl0x
Nvms, minions close pl0x, i just found out i didn't have the files -.-
There could be two reasons:

1: You don't have administrative access to do this.
2: The filename isn't right.

Post the complete exception here.
To catch the complete exception replace msgbox("Failed to rename"), with Clipboard.settext(ex.message)

This will copy the error details. Just post them here, and hopefully we can solve it.

EDIT: *Sigh*
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?