Forum Discussion
Thanks a lot shankar_r. However this seems to be in a language I do not understand. Could you pls. convert it into python or give me some pointers. I tried googling it, but looks like I am making mistakes here and there.
Thanks,
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.
- AlexKaras7 years agoChampion Level 3
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
- 2 days ago
- 2 days ago
- 5 days ago