Deleting the Directory "Favorites" of the Internet Explorer

Started by weissenb, February 04, 2014, 06:35:22 AM

Previous topic - Next topic

weissenb

Hello!
I do not know why but since I changed to Win 8.1 my Directory "Favorites" of the Internet Explorer is getting longer and longer.
So, I decided to write a batch to delete all empty Link entries or subdirs.

But why this code will not work properly (see below).

Thank you very much

Christian

E.g.
dir_IE_Favoriten = "C:\Users\c.weissenberger\Favorites\"

; 1. Wechsel ins entsprechende Verzeichnis / change to "Favorites"
DirChange(dir_IE_Favoriten)

; 2. Entferne die (leeren) Verzeichnisse / delete the empty entries

dir_lstTAB_IE_Favoritenleiste = dir_IE_Favoriten:"Links (49)"
;_dir_lstTAB_IE_Favoritenleiste = DirItemize(iten:"Links*.*")
;__message("", dir_lstTAB_IE_Favoritenleiste)
;__ClipPut(dir_lstTAB_IE_Favoritenleiste)

DirRemoveTrueOrFalse = DirRemove(dir_lstTAB_IE_Favoritenleiste)

If DirRemoveTrueOrFalse == @TRUE
   Message("Meldung","Das Verzeichnis %dir_IE_Favoritenleiste% (Favoritenleiste) ist gelöscht worden!") ; Directory is deleted
else
   Message("Fehlermeldung","Das Verzeichnis %dir_IE_Favoritenleiste% (Favoritenleiste) ist nicht gelöscht worden!") ; Directory failed to be deleted
endif


Deana

DirRemove can only delete EMPTY directories. I recommend using the Shell Operations Extender to delete everything in that directory.

Code (winbatch) Select

; Load Appropriate Extender
AddExtender("wwsop34i.dll",0,"wwsop64i.dll")
;Deletes directory and all of it's contents.
src = ShortCutDir('Favorites')
flags = 0
aFileDelete(src,flags)


http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Functions+DirRemove~Not~Removing~Directory.txt
Deana F.
Technical Support
Wilson WindowWare Inc.