Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored

    [Help]Copy and replacing files

    Hey guys. I need to ask this..

    is there a plan for preventing pop-up while replacing it to a new location?

    Well, Here is an example.
    I want to swap 2 files in their locations but their names will be the other file which was swapped too
    Ex:
    File1[Folder1] --->>> File2[Folder2]
    File2[Folder2]--->>> File1[Folder1]

    I use this codes as swapping them but there is a pop-up. but I just want to copy and replace it without the pop-up
    Code:
    My.Computer.FileSystem.MoveFile("C:\Folder1\File1.txt", _
        "C:\Folder2\File2.txt")
    
    My.Computer.FileSystem.MoveFile("C:\Folder2\File2.txt", _
        "C:\Folder1\file1.txt")
    Oh. btw. My reason why i'm asking this because
    I'm making a program which changes the file location using the timer...
    I like to play a game with my friends that Every second, the notepads changed locations and changes names... then we will need to look for the message of our friends by searching it on 9 folders.
    [1 folder = 9 notepads]

    Its kinda interesting if you like to do it with your friends ^^

  2. #2
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    well, you need admin privileges put on to your program to be able to do that, since the folder is in the root drive...


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  3. #3
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    Quote Originally Posted by mnpeepno2 View Post
    well, you need admin privileges put on to your program to be able to do that, since the folder is in the root drive...
    I'm the only one who controls my computer ^^

  4. #4
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    I do think there is a way of preventing this. Idk how to tho :/



  5. #5
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Run as Admin?

    And a screenshot of the "popup" would be nice.
    -Rest in peace leechers-

    Your PM box is 100% full.

  6. #6
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    Here is a screenshot...

  7. #7
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Meh, It's possible and not complex, however , Windows settings trump vb settings, Best bet, Rename File or Delete File before moving it.

    So the one to be replaced, rename it dsetup.bak


     


     


     



    The Most complete application MPGH will ever offer - 68%




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

    nathanael890 (04-05-2010)

  9. #8
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    Quote Originally Posted by NextGen1 View Post
    Meh, It's possible and not complex, however , Windows settings trump vb settings, Best bet, Rename File or Delete File before moving it.

    So the one to be replaced, rename it dsetup.bak
    Oh. Okay. I'll try that.

    but is there any way to delay those other codes so they might not replaced.

    Let's say... when a messagebox has popped out, then the first move will go.

    then the other 2 will respond after in a short time

  10. #9
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    cant you just mask the name?
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  11. #10
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    Quote Originally Posted by zmansquared View Post
    cant you just mask the name?
    Sorry. But i'm still a beginner in visual basic.
    I don't know what you mean.

  12. #11
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    use my sleep code in the snippets vault, that will delay the actions


     


     


     



    The Most complete application MPGH will ever offer - 68%




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

    nathanael890 (04-05-2010)

  14. #12
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    Quote Originally Posted by NextGen1 View Post
    use my sleep code in the snippets vault, that will delay the actions
    Could you kindly give me a sample code for moving a file by .50 seconds? [that will be the last question at the topic ^^ ]

    btw. I'll read your snippets. it is helpful to me.
    Last edited by nathanael890; 04-05-2010 at 12:52 PM.

  15. #13
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Top Of my head

    It should be

    Code:
     Dim filetr As New FileInfo("Dsetup.dll")
       
       filetr .MoveTo("Dsetup.bak")
    
    Sleep (500) ' Remember in order for this to work you need to add the sleep code from the snippets form, otherwise you can use threading.sleep, but I don't recommend it.
     
     Dim filetm As New FileInfo("C:\Location\Dsetup.dll") ' Your location = wherever file is located
       
       filetm .MoveTo("Wherever you want it\Dsetup.dll")  ' Wherever it is this file needs to go


     


     


     



    The Most complete application MPGH will ever offer - 68%




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

    nathanael890 (04-05-2010)

  17. #14
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    O i didnt think of that. man, gen ROCKS
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  18. #15
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    It works now. Thanks sir Gen

    [I'll not create a thread anymore since this might be simple to you guys]
    what code should it be if you want to copy the content of a textbox by using a button?
    Last edited by nathanael890; 04-05-2010 at 12:28 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help] Copying multiple files with the same extension.
    By Jason in forum Visual Basic Programming
    Replies: 5
    Last Post: 05-29-2010, 03:22 PM
  2. I need help with unpacking .rar and .zip files!
    By projezz in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 04-20-2010, 03:42 AM
  3. [Help] .Rez and .DTX Files
    By Keva1234 in forum Combat Arms Mods & Rez Modding
    Replies: 2
    Last Post: 03-08-2010, 03:55 PM
  4. [Help]Reading and Writing to .txt files on the internet
    By treeham in forum Visual Basic Programming
    Replies: 6
    Last Post: 01-30-2010, 01:07 AM
  5. PLZ help just need some1 to copy and paste
    By GibsonRocks231 in forum Combat Arms Hacks & Cheats
    Replies: 9
    Last Post: 01-11-2009, 02:10 AM