Results 1 to 3 of 3

Thread: Need a Code

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2011
    Posts
    85

    Need a Code

    Hi all!
    I need a code ...

    I want to create a file removal which revieve directory files to delete from a text file ..

    Text file example:
    Code:
    C:\location\file1.exe
    C:\location\file2.exe
    C:\location\file3.exe

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,396

    Re: Need a Code

    If you want to copy and paste a code, try here.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,401

    Re: Need a Code

    Quote Originally Posted by Stunt3r View Post
    Hi all!
    I need a code ...

    I want to create a file removal which revieve directory files to delete from a text file ..

    Text file example:
    Code:
    C:\location\file1.exe
    C:\location\file2.exe
    C:\location\file3.exe
    Please use a descriptive title when posting Stunt3r. "I need a code" is meaningless and will make a lot of members ignore your topic. it also seems like you are demanding it.

    You will need to read the streamwriter class for writing to a text file http://msdn.microsoft.com/en-us/libr...eamwriter.aspx

    You will then need to add the items to an array and loop/delete as necessary.

    vb Code:
    1. Dim files = IO.File.ReadAllLines("path")
    2.  
    3. For Each item As String In files
    4.   'delete file
    5. Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width