Results 1 to 13 of 13
  1. #1
    Cryptonic's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    United Provinces of Canada
    Posts
    1,313
    Reputation
    44
    Thanks
    190
    My Mood
    Bored

    Thumbs up [Help]File Mover

    So, I'm making a program that moves files. But, i have an error.

    I can have it select more than 1 file, but now how to make it move more than 1...

    AND

    Im using a folder browser for the location to be moved, and it needs to to have the file name after it, and if you select more than 1, then it becomes a problem...

    Heres my current code:
    [php] Dim path As String = TextBox1.Text
    Dim destination As String = TextBox2.Text
    If File.Exists(path) And Not File.Exists(destination) Then
    File.Move(path, destination)
    MsgBox("File Moved Successfully", MsgBoxStyle.Information, "Sucess")
    Else
    MsgBox("The file(s) already exist in the current location.", MsgBoxStyle.Critical, "Error")
    End If[/php]

    Hmmmm...

    Any Help?
    Last edited by Cryptonic; 01-20-2011 at 07:02 PM.

  2. #2
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    whats your error?
    Last edited by willrulz188; 01-20-2011 at 07:24 PM.
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  3. #3
    Cryptonic's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    United Provinces of Canada
    Posts
    1,313
    Reputation
    44
    Thanks
    190
    My Mood
    Bored
    Quote Originally Posted by willrulz188 View Post
    whats your error?
    Uhm... my error is how am I sopposta put it so it will auto put the file names in textbox2, and its only set to move 1 file, not 2+

  4. #4
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    Quote Originally Posted by ************* View Post
    Uhm... my error is how am I sopposta put it so it will auto put the file names in textbox2, and its only set to move 1 file, not 2+
    Copy and paste your error or I wont be any help
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  5. #5
    Cryptonic's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    United Provinces of Canada
    Posts
    1,313
    Reputation
    44
    Thanks
    190
    My Mood
    Bored
    Ok...



    Though, the file doesn't exist...

  6. #6
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    I get nothing wrong...


    try

    Code:
            Dim path As String = TextBox1.Text
            Dim destination As String = TextBox2.Text
            If IO.File.Exists(path) And Not IO.File.Exists(destination) Then
                IO.File.Move(path, destination)
                MsgBox("File Moved Successfully", MsgBoxStyle.Information, "Sucess")
            Else
                MsgBox("The file(s) already exist in the current location.", MsgBoxStyle.Critical, "Error")
            End If
    
    Last edited by willrulz188; 01-20-2011 at 07:46 PM.
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  7. #7
    Calebb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    212
    Reputation
    12
    Thanks
    75
    If i'm understanding you right, just give each file an assigned textbox.

  8. #8
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,670
    My Mood
    Breezy
    How is your code even readable? O__o Black background ftw?
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  9. #9
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    Quote Originally Posted by master131 View Post
    How is your code even readable? O__o Black background ftw?
    easier on the eyes
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  10. #10
    Calebb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    212
    Reputation
    12
    Thanks
    75
    Quote Originally Posted by master131 View Post
    How is your code even readable? O__o Black background ftw?
    High Contrast. ;D
    Alt + Shift + PrtScrn

    /offtopic

  11. #11
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    Quote Originally Posted by Calebb View Post
    High Contrast. ;D
    Alt + Shift + PrtScrn

    /offtopic
    Nope Tools>Options>Environments lol
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  12. #12
    Cryptonic's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    United Provinces of Canada
    Posts
    1,313
    Reputation
    44
    Thanks
    190
    My Mood
    Bored
    Quote Originally Posted by willrulz188 View Post
    I get nothing wrong...


    try

    Code:
            Dim path As String = TextBox1.Text
            Dim destination As String = TextBox2.Text
            If IO.File.Exists(path) And Not IO.File.Exists(destination) Then
                IO.File.Move(path, destination)
                MsgBox("File Moved Successfully", MsgBoxStyle.Information, "Sucess")
            Else
                MsgBox("The file(s) already exist in the current location.", MsgBoxStyle.Critical, "Error")
            End If
    
    Well, first off, I'm trying to make it where you don't have to put the filename in the second textbox. If i put the filename in the textbox, that error wouldn't happen. Which should fix the other errors because if you select more than 1 file, you would have to enter more than 1 filename.. that or it wouldn't work at all...

  13. #13
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Oops, I posted a solution in your other thread, didn't realize you made another thread /QQ

    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)