Perhaps a macro like this?
Macro author: Roy Cox (royUK) and I've modified it a bit:
Option Explicit
Sub Open_All_Files()
Dim oWbk As Workbook
Dim sFil As String
Dim sPath As String
Dim tPath As String
sPath = "C:\Test" 'location of files to be converted
tPath = "C:\Target" 'location of converted file
ChDir sPath
sFil = Dir("*.xls") 'change or add formats
Do While sFil <> "" 'will start LOOP until all files in folder sPath have been looped through
Set oWbk = Workbooks.Open(sPath & "\" & sFil) 'opens the file
sFil = Replace(ActiveWorkbook.Name, ".xls", ".xlsm")
ActiveWorkbook.SaveAs tPath & "\" & sFil, FileFormat:=xlOpenXMLWorkbookMacroEnabled
oWbk.Close
sFil = Dir
Loop ' End of LOOP
End Sub
This macro will save all files in folder C:\Test to folder C:\Target as macro enabled files. If your .xls files don't contain any macros change ".xlsm" to ".xlsl" and change "FileFormat:=xlOpenXMLWorkbookMacroEnabled" to "FileFormate:=xlOpenXMLWorkbook"
You said you had 2000 folders. Is there perhaps a comon structure to the folder names? Or are all folders subfolders under a master folder? If so macro could be written to start with the master folder and then loop through all subfolders.
Alf
Ps Any credit for solving this problem goes to royUK
You
Bookmarks