Hello.
I have a program which creates a random text file name, places it in a list box and places the file in my documents.
I have a delete button which deletes the file from the list box but doesn't delete it from my documents. How do I read the file from the list box and ensure it's the same one as in my documents, then delete it if the button is clicked.
Thanks
P.S i'm new to these forums, I don't know how to turn code text type off lol
Loading
SenthilkumarPosted Apr 10, 2012, 11:45 PM
For delete the items in the ListBox you can use the following statements.
For check the file exits in the directory or not,
Here if you have full path of the file in the listbox then you can use directly as path. Otherwise you know the path where it is stored then you can hard code the path along with the selected file in the list box.
Hope this will help you.