Forum Discussion
This is the code, I am trying to use:
def ClearAllChromeStoredInfo():
objFSO = CreateObject("Scripting.FileSystemObject")
strAppDataFolder = aqEnvironment.GetEnvironmentVariable(("LocalAppData") & "\Google\Chrome\User Data\Default")
FilesInFolder = objFSO.GetFolder(strAppDataFolder).Files
Log.Message(FilesInFolder)
FoldersInFolder = objFSO.GetFolder(strAppDataFolder).SubFolders
for Folder in FoldersInFolder:
if UCase(Folder.Name) = "EXTENSIONS" and LCase(Folder.Name) = "EXTENSION STATE"
Folder.Delete True
break
For File In range (FilesInFolder)
If Not UCase(File.Name) = "PREFERENCES"
File.Delete
break
The error I am getting is attached.
Hi,
I am not a Python expert. And not sure what line has #4, but maybe the slashes must be doubled? I.e.: "\\Google\\Chrome\\User Data\\Default" ?
Related Content
- 2 years ago
Recent Discussions
- 5 hours ago