Option Explicit Const MAX_PATH = 260 Const INVALID_HANDLE_VALUE = -1 Private Type FILETIME dwLowDate As Long dwHighDate As Long End Type Private Type SYSTEMTIME wYear As Integer wMonth As Integer wDayOfWeek As Integer wDay As Integer wHour As Integer wMinute As Integer wSecond As Integer wMilliseconds As Integer End Type Private Type WIN32_FIND_DATA dwFileAttributes As Long ftCreationTime As FILETIME ftLastAccessTime As FILETIME ftLastWriteTime As FILETIME nFileSizeHigh As Long nFileSizeLow As Long dwReserved0 As Long dwReserved1 As Long cFileName As String * MAX_PATH cAlternate As String * 14 End Type Private Declare Function FindFirstFile Lib "kernel32" _ Alias "FindFirstFileA" _ (ByVal lpFileName As String, _ lpFindFileData As WIN32_FIND_DATA) As Long Private Declare Function FindNextFile Lib "kernel32" _ Alias "FindNextFileA" _ (ByVal hFindFile As Long, _ lpFindFileData As WIN32_FIND_DATA) As Long Private Declare Function FindClose Lib "kernel32" _ (ByVal hfile As Long) As Long Private Declare Function FileTimeToLocalFileTime Lib "kernel32" _ (lpFileTime As FILETIME, lpLocalFileTime As FILETIME) As Long Private Declare Function FileTimeToSystemTime Lib "kernel32" _ (lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long Private Sub CmdLire_Click() Dim FindData As WIN32_FIND_DATA Dim Nom As String Dim Hfind As Long Dim Rep As Long Dim Attr As Long Dim Ft1 As FILETIME Dim Ft2 As FILETIME Dim St As SYSTEMTIME Dim Zd As Date Nom = "C:\TEMP\*.*" Hfind = FindFirstFile(Nom, FindData) If Hfind = INVALID_HANDLE_VALUE Then Exit Sub Do Attr = FindData.dwFileAttributes If (Attr And 31) < 8 Then ' Label1 ne sert qu'à enlever les zéros de la fin Label1 = FindData.cFileName Ft1 = FindData.ftCreationTime ' Conversion File Time en Local File Time FileTimeToLocalFileTime Ft1, Ft2 ' Conversion File Time to System File Time FileTimeToSystemTime Ft2, St ' Mise en Format Date Zd = CDate(St.wDay & "/" & St.wMonth & "/" & St.wYear) List1.AddItem Zd & vbTab & Label1 End If Rep = FindNextFile(Hfind, FindData) Loop Until Rep = 0 FindClose Hfind End Sub