hi, i have found the below code in this link https://www.mrexcel.com/forum/excel...all-folders-subfolders-based-excel-sheet.html
this code required all files to be in one folder. is it possible someone change it so it can also search for subfolders
thanks alot for any help
HTML:
Sub CopyMacro()Set fs = CreateObject("Scripting.FileSystemObject")n = 2Do While Range("A" & n).Value <> ""fs.CopyFile Range("B" & n).Value & "\" & Range("A" & n).Value & ".*", Range("C" & n).Value & "\"n = n + 1LoopEnd Sub
this code required all files to be in one folder. is it possible someone change it so it can also search for subfolders
thanks alot for any help