Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Deleting files

  • 20-07-2004 09:24AM
    #1
    Closed Accounts Posts: 537 ✭✭✭


    What is the object you use in VB to deletre files off of the c drive or any drive for that matter


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    For VB6 you can use the FileSystemObject.DeleteFile method. Or you can use just use the Kill method i.e. Kill C:\stuff.txt.

    With .Net you can use many, many ways. For instance you can use File.Delete("C:\stuff.txt"). File.Delete is static so you don't have to instantiate a File object first. Forgive my vb.net, I'm a C# boy.


Advertisement