Try something like the code below, which hasnt been tested, and may need a little work - but should give you an idea on how to do what you need
Dim objDir As IO.Directory
Dim objFile As IO.File
Dim strFile As String
For Each strFile In objDir.GetFiles("c:\myfolder")
If Mid(strFile, Len(strFile) - 4) = "jpeg" Then
objFile.Copy(strFile, "c:\backup\" + Mid(strFile, _
strFile.LastIndexOf("\") + 1))
End If
Next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.