You can find a number of MapBasic libraries/modules that can give you a list of files in a directory. Use one of these to get the list and then loop thru the list and do your task with the individual tables.
On Community Download you can find these libraries that can help you:
The last one can be used like this:
nNumFiles = FILEFindFilesInFolder("C:\Temp", "*.tab")
For i = 1 To nNumFiles
sFile = FILEGetFindFilesFileName(i)
'**Do your work with the table
Next
Remember to copy the FILELib.dll to your application directory