none
how to: permanently delete a file...

    Question

  • i have a listbox that loads all text files in a set folder on form load .
    from those files in the list box, i want to permanently delete a file from my pc , thru a button that i'll eventually add a yes/no msgbox before deletion..  just to click on a file in the listbox, then the delete button , and delete the file .


    just a squirrel looking for my nut...
    Wednesday, April 22, 2009 8:49 PM

Answers

  • I assume that the part you are having trouble with is the file deletion?

    Here is how you delete a file with VB:

    My

     

    .Computer.FileSystem.DeleteFile("fileName")

    Hope this helps.


    www.insteptech.com
    Wednesday, April 22, 2009 8:53 PM

All replies

  • I assume that the part you are having trouble with is the file deletion?

    Here is how you delete a file with VB:

    My

     

    .Computer.FileSystem.DeleteFile("fileName")

    Hope this helps.


    www.insteptech.com
    Wednesday, April 22, 2009 8:53 PM
  • My.Computer.FileSystem.DeleteFile("fileName")

    works just as i need it to.

    thanx..
    just a squirrel looking for my nut...
    Wednesday, April 22, 2009 9:01 PM