Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11301
| Newsgroups | microsoft.public.scripting.vbscript |
|---|---|
| Date | 2016-05-05 05:41 -0700 |
| References | <8cc78a54-85aa-46e7-b701-092b99b4c53f@googlegroups.com> |
| Message-ID | <b78850f5-4d8e-40fd-b04a-5addc362b5fb@googlegroups.com> (permalink) |
| Subject | Re: Delete folder with spaces in path |
| From | peter.vandewalle@designexpress.eu |
Op donderdag 5 mei 2016 09:02:03 UTC+2 schreef peter.va...@designexpress.eu:
> I'm trying to delete a folder in the 'Program Files'. But I don't see why this wont work...
> Here's the code I'm trying:
>
> Sub DeleteAFolder(filespec)
> Dim fso
> Set fso = CreateObject("Scripting.FileSystemObject")
> fso.DeleteFolder(filespec)
> End Sub
>
> DeleteAFolder("C:\Program Files\TestFolder")
>
>
> Result: "Permission denied"
>
> I also tried:
>
> Sub DeleteAFolder(filespec)
> Dim fso
> Set fso = CreateObject("Scripting.FileSystemObject")
> fso.DeleteFolder(filespec)
> End Sub
>
> DeleteAFolder("""C:\Program Files\TestFolder""")
>
>
> Result: "Path not found"
>
>
> Any ideas?
How can I add admin privileges to the script?
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar
Delete folder with spaces in path peter.vandewalle@designexpress.eu - 2016-05-05 00:01 -0700
Re: Delete folder with spaces in path "Auric__" <not.my.real@email.address> - 2016-05-05 07:37 +0000
Re: Delete folder with spaces in path peter.vandewalle@designexpress.eu - 2016-05-05 05:41 -0700
Re: Delete folder with spaces in path "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-05-05 14:52 +0200
Re: Delete folder with spaces in path JJ <jj4public@vfemail.net> - 2016-05-06 06:09 +0700
csiph-web