Sub fdece()
Dim SourceWkb As Workbook, NbLignes As Long, NbColonnes As Long, FS As FileSearch, DerColonne As Long
DerColonne = ThisWorkbook.Worksheets("fdece").Range("IV1").End(xlToLeft).Column
Set FS = Application.FileSearch
With FS
.LookIn = "C:\Documents and Settings\Desktop\XL\XL"
.Filename = "fdece*.txt"
End With
If FS.Execute(msoSortByLastModified, msoSortOrderAscending) > 0 Then
For i = 1 To FS.FoundFiles.Count
If Application.WorksheetFunction.CountIf(ThisWorkbook.Worksheets("fdece").Range(ThisWorkbook.Worksheets("fdece").Cells(1, DerColonne), ThisWorkbook.Worksheets("fdece").Cells(65536, DerColonne)), CLng(Mid(FS.FoundFiles(i), Len(FS.FoundFiles(i)) - 9, 6))) = 0 Then
Workbooks.OpenText Filename:=FS.FoundFiles(i), Origin:= _
xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote _
, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=True, Comma:= _
False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1) _
, Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), _
Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array(14, 1), Array(15, 1), Array( _
16, 1), Array(17, 1), Array(18, 1), Array(19, 1), Array(20, 1), Array(21, 1)), _
TrailingMinusNumbers:=True
Set SourceWkb = ActiveWorkbook
NbColonnes = SourceWkb.ActiveSheet.Range("IV1").End(xlToLeft).Column
NbLignes = SourceWkb.ActiveSheet.Range("A65536").End(xlUp).Row
With SourceWkb.ActiveSheet
.Range(.Cells(1, NbColonnes + 1), .Cells(NbLignes, NbColonnes + 1)).Value = Mid(FS.FoundFiles(i), Len(FS.FoundFiles(i)) - 9, 6)
.Range(.Cells(1, 1), .Cells(NbLignes, NbColonnes + 1)).Copy Destination:=ThisWorkbook.Worksheets("fdece").Range("A65536").End(xlUp).Offset(1, 0)
End With
SourceWkb.Close False
End If
Next i
End If
End Sub