Results 1 to 6 of 6
  1. #1
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276

    hmm..how do i make a delete comand ignore certain files?

    lets see, i have this code

    Code:
     Dim f() As IO.FileInfo
            Dim FD As IO.FileInfo
    
            f = dir.GetFiles
         For Each FD In f
    
                FD.Delete()
    
            Next
    
            Dim da() As IO.DirectoryInfo
            Dim d1 As IO.DirectoryInfo
    
            da = dir.GetDirectories
            For Each d1 In da
                DeleteDirContents(d1)
            Next
        End Sub
    and well, i cant do On Error Resume next, because it just skips the entire delete. There are some files in the directory i am deleting files from that are being used by another process. how would i make it skip those files?

    and btw..i didnt just copy paste this

  2. #2
    Calebb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    212
    Reputation
    12
    Thanks
    75
    I was gonna suggest On error resume next.

  3. #3
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    could u be clearer in what u are asking? Specifically here -->"There are some files in the directory i am deleting files from that are being used by another process." I think i can help u but u need to be clearer so i can help u better

  4. #4
    mnpeep's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    220
    Reputation
    12
    Thanks
    10
    My Mood
    Amazed
    hmmm, when you try to modify or read files being run by windows, it comes with an error that another program is using it, so the delete will just skip it all together.

  5. #5
    Threadstarter
    Synthetic Hacker
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    im trying to skip the files that it cannot delete. even if i dont know the name of the file.
    like say index.dat is being used by another process. i want it to ignore that file even if i dont tell it the name of the file in the code

  6. #6
    mnpeep's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    220
    Reputation
    12
    Thanks
    10
    My Mood
    Amazed
    im pretty sure C++ can do that, i dunno about VB sorry.

Similar Threads

  1. How do I make it so I can attack files???
    By ritty111 in forum Suggestions, Requests & General Help
    Replies: 3
    Last Post: 12-04-2009, 09:22 PM
  2. HMM How many workds can u make with IMAMPGHHACKER
    By asfdr12345 in forum Spammers Corner
    Replies: 3
    Last Post: 08-11-2009, 09:23 AM
  3. Help! how do i make a jap warrock name?
    By gmgundamx7 in forum WarRock - International Hacks
    Replies: 4
    Last Post: 04-04-2007, 11:07 AM
  4. How'd you make these?
    By Twisty in forum Art & Graphic Design
    Replies: 1
    Last Post: 03-13-2007, 03:27 AM
  5. how can i make game hack?!!!!
    By UnknownID in forum General Game Hacking
    Replies: 2
    Last Post: 02-07-2006, 07:21 PM