Jump to content

Recommended Posts


This should work then

Const SMP = &H17&
Set oShell = CreateObject("Shell.Application")
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFolderItem = oShell.Namespace(SMP).Self
fso.DeleteFolder oFolderItem.Path & "\RA", true

Edited by Daimao
Link to comment
Share on other sites

Here is the same script except I added a check to see if the folder exists.

 Const SMP = &H17&
Dim Fso, oShell,oFolderItem, Target
Set oShell = CreateObject("Shell.Application")
Set Fso = CreateObject("Scripting.FileSystemObject")
Set oFolderItem = oShell.Namespace(SMP).Self
'/-> Replace Your_Folder_Name With The Name Of The Folder
Target = oFolderItem.Path & "\Your_Folder_Name"
If Fso.FolderExists(Target) Then
Fso.DeleteFolder(Target)
Else
MsgBox "This folder does not exists" & vbCrLf & Target,4128,"Missing Folder"
End If

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...