cs_kalif
Messages postés362Date d'inscriptionmardi 18 décembre 2001StatutMembreDernière intervention24 août 2012
-
3 mai 2002 à 16:12
cs_ynizon
Messages postés53Date d'inscriptionmardi 30 avril 2002StatutMembreDernière intervention19 avril 2012
-
23 mai 2002 à 09:42
comment supprimer tout un ou plusieur cookie qui se trouve dans C:\WINDOWS\Temporary Internet Files ????
cs_ynizon
Messages postés53Date d'inscriptionmardi 30 avril 2002StatutMembreDernière intervention19 avril 20121 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
cs_kalif
Messages postés362Date d'inscriptionmardi 18 décembre 2001StatutMembreDernière intervention24 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
Vous n’avez pas trouvé la réponse que vous recherchez ?
cs_ynizon
Messages postés53Date d'inscriptionmardi 30 avril 2002StatutMembreDernière intervention19 avril 20121 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.