Like:
VB Code:
Option Explicit Private Sub Form_Load() Dim strBuff As String 'Set the first FileName (if pressent) strBuff = Dir("C:\temp\*.*", vbNormal) 'If a FileName exisits - perform the copy if Numeric, and continue till all files copied If Len(strBuff) <> 0 Then Do If IsNumeric(Left$(strBuff, InStr(strBuff, ".") - 1)) Then FileCopy "C:\temp\" & strBuff, "C:\temp\New Folder\" & strBuff End If strBuff = Dir Loop Until Len(strBuff) = 0 End If End Sub
Bruce.




Reply With Quote