O
Omega Warrior
I'm having a difficulty...
Dim fso
Dim filename
fso = CreateObject("Scripting.FileSystemObject")
Dim File, Folder, FileCollection
Folder = fso.GetFolder("C:\test\")
FileCollection = Folder.Files
For Each File In FileCollection
fso.DeleteFile(File)
Next
and when i run this code I get the following error:
An unhandled exception of type 'System.Security.SecurityException' occurred
in microsoft.visualbasic.dll
Additional information: Exception from HRESULT: 0x800A0046
(CTL_E_PERMISSIONDENIED).
Its like it wont give me ermission to do that. How do I enable the
permission to do that?
Thank you!
Dim fso
Dim filename
fso = CreateObject("Scripting.FileSystemObject")
Dim File, Folder, FileCollection
Folder = fso.GetFolder("C:\test\")
FileCollection = Folder.Files
For Each File In FileCollection
fso.DeleteFile(File)
Next
and when i run this code I get the following error:
An unhandled exception of type 'System.Security.SecurityException' occurred
in microsoft.visualbasic.dll
Additional information: Exception from HRESULT: 0x800A0046
(CTL_E_PERMISSIONDENIED).
Its like it wont give me ermission to do that. How do I enable the
permission to do that?
Thank you!