I’m working on a simple script that will go through all of the user profiles located on a network share and delete the cookies located under their TSProfile Folder. Some of the user folders will not have TSProfiles while others do. Here is the script I’ve been trying to get to work:
Const DeleteReadOnly = TRUE
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
set wshNetwork = Wscript.CreateObject(“Wscript.Network”)
struser = wshNetwork.UserName
objFSO.DeleteFile (“E:\” & struser & “tsprofile\Cookies\*.txt”), DeleteReadOnly
I get a script host error with the following:
Line 6
Char 1
Error: File not found
Code: 800A0035
Any help would be appreciated