COOKIE

cs_kalif Messages postés 362 Date d'inscription mardi 18 décembre 2001 Statut Membre Dernière intervention 24 août 2012 - 3 mai 2002 à 16:12
cs_ynizon Messages postés 53 Date d'inscription mardi 30 avril 2002 Statut Membre Dernière intervention 19 avril 2012 - 23 mai 2002 à 09:42
comment supprimer tout un ou plusieur cookie qui se trouve dans C:\WINDOWS\Temporary Internet Files ????

6 réponses

cs_ynizon Messages postés 53 Date d'inscription mardi 30 avril 2002 Statut Membre Dernière intervention 19 avril 2012 1
3 mai 2002 à 17:08
Pour chopper le repertoire, tu fais:

REP=GET_DossierSpecial(32)
et puis, tu delete tes fichiers avec des collections de dossier et de fichiers avec un filesystemobject par exemple.
Set colFolders = REP.SubFolders
For Each objFolder In colFolders
Set colFiles = objFolder.Files
For Each objFile In colFiles
if fichier alors delete
next
next

Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" _
(ByVal pidl As Long, ByVal pszPath As String) As Long
Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" _
(ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As Long

Public Function GET_DossierSpecial(CSIDL As Long) As String
Dim Formhwnd As Long
Formhwnd = 0
Dim r As Long
Dim sPath As String
Dim IDL As ITEMIDLIST
Const NOERROR = 0
Const MAX_LENGTH = 260
'fill the idl structure with the specified folder item
r = SHGetSpecialFolderLocation(Formhwnd, CSIDL, IDL)
If r = NOERROR Then
'Of the structure is filled, initialize and
'retrieve the path from the id list, and return
'the folder with a trailing slash appended.
sPath = Space$(MAX_LENGTH)
r = SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal sPath)
If r Then
GET_DossierSpecial = Left$(sPath, _
InStr(sPath, Chr$(0)) - 1) & ""
End If
End If
End Function
0
cs_kalif Messages postés 362 Date d'inscription mardi 18 décembre 2001 Statut Membre Dernière intervention 24 août 2012
4 mai 2002 à 19:02
il me met:
Type défini par l'utilisateur non défini a

Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As Long
0
cs_ynizon Messages postés 53 Date d'inscription mardi 30 avril 2002 Statut Membre Dernière intervention 19 avril 2012 1
14 mai 2002 à 09:06
Oui, désolé jai oublié cette partie.
Public type SHITEMID
cb as long
abID as byte
end type

Public type ITEMIDLIST
mkid as SHITEMID
end type
0
cs_kalif Messages postés 362 Date d'inscription mardi 18 décembre 2001 Statut Membre Dernière intervention 24 août 2012
14 mai 2002 à 14:52
un objet est requis

a partir de:

Set colFolders = REP.SubFolders
For Each objFolder In colFolders
Set colFiles = objFolder.Files
For Each objFile In colFiles
'if fichier alors delete
Next
Next
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
tohcas Messages postés 6 Date d'inscription mercredi 15 mai 2002 Statut Membre Dernière intervention 29 décembre 2002
22 mai 2002 à 18:23
Est-ce que la commande "SHELL("del c:\windows\Temporary Internet File\*.txt") ne serait pas plus appropriée ?

Orion
0
cs_ynizon Messages postés 53 Date d'inscription mardi 30 avril 2002 Statut Membre Dernière intervention 19 avril 2012 1
23 mai 2002 à 09:42
Mais bien sur, t es un petit malin toi ! Si j ai ecris des API pour chopper le repertoire , c est parceque le repertoire peut changer dun ordi a lautre, avec ta commande, ca planterai les ordis en version anglaise par exemple ....
Avec la mienne, ca fonctionnera tout le temps.
0
Rejoignez-nous