About 14,500,000 results
Open links in new tab
  1. How to delete a file using VB.NET? - Stack Overflow

    Mar 23, 2015 · To delete a file from your computer, you use the Delete method of System.IO. Here's some new code for you to try: File.Exists is not necessary. See help on MSDN. If the …

  2. How to: Delete a File - Visual Basic | Microsoft Learn

    Sep 15, 2021 · The DeleteFile method of the My.Computer.FileSystem object allows you to delete a file. Among the options it offers are: whether to send the deleted file to the Recycle Bin, …

  3. How To Delete a File in VB.NET

    Jan 24, 2020 · In this article I describe how to delete a file using VB.NET. The Delete method deletes the specified file permanently. Example: Suppose you want to delete a file at location …

  4. [RESOLVED] clear text file contents-VBForums - Visual Basic

    Nov 2, 2011 · is there a command that clears all contents in a .txt file? I use the Print command to add entries so I was hoping there was some command that was opposite of Print.

  5. vb.net - Clearing a text file without deleting it - Stack Overflow

    Dec 23, 2014 · You can start by overwriting the file with an empty string, and then append your data afterwards. You could use this to overwrite the file: System.IO.File.WriteAllText(Path, "") …

  6. Visual Basic .NET programming: How to Delete a File

    Make sure the file you're going to delete is not needed - you won't be able to restore it from the recycle bin! To delete a file from your computer, you use the Delete method of System.IO.

  7. FileSystem.DeleteFile Method (Microsoft.VisualBasic.FileIO)

    My.Computer.FileSystem.DeleteFile( "C:\test.txt", FileIO.UIOption.AllDialogs, FileIO.RecycleOption.SendToRecycleBin, FileIO.UICancelOption.ThrowException) This …

  8. vb.net - VB Clear text file before writing - Stack Overflow

    Apr 30, 2015 · Just use File.WriteAllText. As explained by MSDN. Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten. …

  9. Creating, Deleting, and Moving Files and Directories - Visual Basic

    Sep 15, 2021 · This section lists tasks associated with creating, deleting, moving, and renaming files and directories in Visual Basic.

  10. Open and Clear a text file.-VBForums - Visual Basic

    Jul 17, 2006 · I have a text file that I am recording information into, however I want the user to be able to click a button to wipe the text file clean. So I am not deleating the text file, but just …

Refresh