Results 1 to 10 of 10
  1. #1
    [Project Recon]Porhaxn's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    14
    Reputation
    10
    Thanks
    0

    [HELP]When File already exists, how do we by pass that error.

    When a file already exists at the location, how do we bypass that error and overrite that file?
    Last edited by [Project Recon]Porhaxn; 06-19-2010 at 01:07 PM.

  2. #2
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Elaborate?

  3. #3
    apandhi's Avatar
    Join Date
    Apr 2007
    Gender
    male
    Location
    NY
    Posts
    45
    Reputation
    10
    Thanks
    19
    for starting a program after you click a button use

    Code:
    Shell("cmd.exe /c [program path and name (i.e. C:\Program Files\run.exe)]")
    for moving and copying files you have to look up the cmd commands for that. Sorry if the code above has a few errors in it. I havent done VB in a long time!

  4. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Delete the Initial File first....

    [php]
    Dim FileToDelete as New FileInfo("FilePath\FileName.Extension")
    FileToDelete.Delete()
    [/php]

    Then

    [php]
    If System.IO.File.Exists("Filepath/FileToMove.Extension) = True Then
    System.IO.File.Move("Filepath/FileToMove.Extension", "Path To Move File")
    End If
    [/php]

    If you want to go a-little further you can use P/Invoke and Force Delete the File first...But in either case, delete the file then move to path...


    By the way, that is exactly how windows works with overwriting, it just moves quick, when you get the dialog box or message box that says "would you like to overwrite?" what it is actually saying is, would you like to delete the original file and replace it with this one. So manually delete file then move

    Last edited by NextGen1; 06-19-2010 at 02:33 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. The Following User Says Thank You to NextGen1 For This Useful Post:

    [Project Recon]Porhaxn (06-19-2010)

  6. #5
    MvRouC12's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Stalking Choobs
    Posts
    1,690
    Reputation
    13
    Thanks
    246
    My Mood
    Amused
    Nextgen you have wayyyy to much time on your hands. haha.

    [IMG]https://i986.photobucke*****m/albums/ae345/TripleSixPf/Okami-MvRouC12.jpg[/IMG]
    Quote Originally Posted by m_t_h View Post


    By stop playing AVA untill brasilian server comes.

    Do you guys really need to ruin EVERY game?
    [IMG]https://i175.photobucke*****m/albums/w148/Guitarman1157/dontforget.gif[/IMG]

  7. #6
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by SSK.Darken View Post
    Nextgen you have wayyyy to much time on your hands. haha.
    Lol how is that having way to much time on his hands. It was a good and comprehensive answer but it's not like it was pages and pages of explanation. Knowing NextGen, I'd take a stab at <5 mins to write that post.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  8. The Following User Says Thank You to Jason For This Useful Post:

    NextGen1 (06-20-2010)

  9. #7
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    What Nextgen told you, is kinda logical if you actually think about it. So, good solution :]



  10. The Following User Says Thank You to Blubb1337 For This Useful Post:

    NextGen1 (06-20-2010)

  11. #8
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    I have 0 time on my hands :P and I still make time to do my "job"


     


     


     



    The Most complete application MPGH will ever offer - 68%




  12. The Following User Says Thank You to NextGen1 For This Useful Post:

    Jason (06-20-2010)

  13. #9
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by NextGen1 View Post
    I have 0 time on my hands :P and I still make time to do my "job"
    And we appreciate it.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  14. The Following User Says Thank You to Jason For This Useful Post:

    NextGen1 (06-20-2010)

  15. #10
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Quote Originally Posted by SSK.Darken View Post
    Nextgen you have wayyyy to much time on your hands. haha.
    >.<
    Heck, i don't think he'd spend that long.

    Maybe. what... less than a few minutes?
    But good job NextGen !

Similar Threads

  1. [Help]How to start another program?[Solved]
    By Web-Designer in forum Visual Basic Programming
    Replies: 11
    Last Post: 09-04-2010, 11:13 PM
  2. [Help]Starting a process[solved]
    By nathanael890 in forum Visual Basic Programming
    Replies: 4
    Last Post: 03-30-2010, 05:43 PM
  3. Help with veiwing program?
    By foodman in forum C++/C Programming
    Replies: 6
    Last Post: 04-10-2009, 10:27 AM
  4. Getting started in programming hacks for combat arms.
    By killerthc in forum Combat Arms Hacks & Cheats
    Replies: 15
    Last Post: 08-25-2008, 04:47 PM
  5. HELP: What other programs do I need to learn/start hacking?
    By ronyoung08 in forum General Hacking
    Replies: 0
    Last Post: 08-01-2008, 09:40 PM