How to Get to A folder Without the full path In VB
Go to solution
Solved by bbtgp,
Would that work in visual basic.
this is the code for one of them
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.ClickMy.Computer.FileSystem.DeleteDirectory("C:\Users\Christian\Documents\Electronic Arts\The Sims 3\DCBackup",Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,Microsoft.VisualBasic.FileIO.RecycleOption.DeletePermanently,Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)End Sub
Yes, My.Computer.FileSystem.SpecialDirectories.MyDocuments would also work
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
My.Computer.FileSystem.DeleteDirectory(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\Electronic Arts\The Sims 3\DCBackup",
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
Microsoft.VisualBasic.FileIO.RecycleOption.DeletePermanently,
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
End Sub
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now