Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub copy_files_from_subfolders()
- Dim fso As Object
- Dim fld As Object
- Dim fsofile As Object
- Dim fsofol As Object
- sourcepath = "FINAL CUT"
- destinationpath = "DesaMECA"
- If Right(sourcepath, 1) <> "" Then
- sourcepath = sourcepath & ""
- End If
- Set fso = CreateObject("scripting.filesystemobject")
- Set fld = fso.GetFolder(sourcepath)
- If fso.FolderExists(fld) Then
- For Each fsofol In fso.GetFolder(sourcepath).SubFolders
- For Each fsofile In fsofol.Files
- If Right(fsofile, 6) = 566978 Then
- fsofile.Copy destinationpath
- End If
- Next
- Next
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement