SHARE
TWEET

Untitled

a guest Feb 20th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub copy_files_from_subfolders()    
  2.     Dim fso As Object
  3.     Dim fld As Object
  4.     Dim fsofile As Object
  5.     Dim fsofol As Object
  6.  
  7.     sourcepath = "FINAL CUT"
  8.     destinationpath = "DesaMECA"
  9.  
  10.     If Right(sourcepath, 1) <> "" Then
  11.     sourcepath = sourcepath & ""
  12.     End If
  13.  
  14.     Set fso = CreateObject("scripting.filesystemobject")
  15.     Set fld = fso.GetFolder(sourcepath)
  16.     If fso.FolderExists(fld) Then
  17.         For Each fsofol In fso.GetFolder(sourcepath).SubFolders
  18.             For Each fsofile In fsofol.Files
  19.                 If Right(fsofile, 6) = 566978 Then
  20.                 fsofile.Copy destinationpath
  21.             End If
  22.             Next
  23.         Next
  24.     End If
  25. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top