sans,
The following macro calls a custom subroutine I created awhile ago which is used to loop through all subfolders in a main folder and get all of the full file paths and names that meet a file extension criteria. In this case, I set the file extension criteria to be "xls*" to that it will pick up only Excel files (xls, xlsx, and xlsm). Then it uses that file's workbook name to rename the first sheet to be the same name as the workbook. In some cases, this may not be strictly possible due to sheet name character limit and illegal characters in the sheet name, but the macro will get it as close as possible (and in the majority of cases it should be an exact match). Just change the "C:\Test" (in red in the code) to the correct folder path of the main folder.
Here is the subroutine I created that is called in the above macro. It is a recursive subroutine (it calls itself) so it doesn't matter how many subfolders there are, nor how many subfolders each subfolder has, and so on:
Bookmarks