Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System
- Imports System.IO
- Imports System.Collections
- Imports System.Environment
- Public Class Form1
- Dim appData As String = GetFolderPath(SpecialFolder.UserProfile)
- Dim crsfolder As String = "\.crs_cache_v4"
- Dim fullpath As String = appData & crsfolder
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- If Directory.Exists(fullpath) Then
- TextBox1.Text = fullpath
- Else
- TextBox1.Text = "Cache was not found"
- Button1.Visible = False
- End If
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- Me.Close()
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim response As String = MsgBox("Are you sure you wish to delete this folder?", vbYesNo, "Continue")
- If response = vbYes Then
- If Directory.Exists(fullpath) Then
- System.IO.Directory.Delete(fullpath, True)
- MsgBox("Cache was deleted")
- Else
- MsgBox("Cache was NOT found")
- End If
- Else
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement