Thread: Renaming files

Results 1 to 3 of 3
  1. #1
    porhaxn's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    85
    Reputation
    10
    Thanks
    13

    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
    [IMG]https://i371.photobucke*****m/albums/oo155/Remixdvd/PRMT_PorHaxn.gif[/IMG]

    MPGH respect list:
    [MPGH]Obama

  2. #2
    porhaxn's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    85
    Reputation
    10
    Thanks
    13
    Nvms, minions close pl0x, i just found out i didn't have the files -.-
    [IMG]https://i371.photobucke*****m/albums/oo155/Remixdvd/PRMT_PorHaxn.gif[/IMG]

    MPGH respect list:
    [MPGH]Obama

  3. #3
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    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*

Similar Threads

  1. Help RENAME FILE DLL??
    By alkabiiru in forum Piercing Blow Discussions
    Replies: 1
    Last Post: 03-05-2011, 09:17 PM
  2. File Scan here
    By Neogaidenx in forum Spammers Corner
    Replies: 4
    Last Post: 08-14-2008, 11:30 AM
  3. Free File Hosts
    By Paolo1993 in forum Spammers Corner
    Replies: 5
    Last Post: 04-12-2008, 08:33 PM
  4. Looking for the old Warrock Game Files
    By Zededarian in forum WarRock - International Hacks
    Replies: 2
    Last Post: 01-10-2006, 02:30 PM