A few points:
- That script will never work with the .vbx extension - it should be .vbs
to run VBScript. Last time I saw .vbx it was in a VB6 project and you don't want to go there.
- That script works for me as a .vbs, so if you are getting that error it may be that it is indeed corrupted. I can't replicate your exact circumstances. Do you have access to all sub-folders of F:\Movies for example.
- I do get an error similar in wording when I try to open the output - you should be using a .xlsx file for more modern versions of Excel.
- To answer your question of "Maybe the "." should be between the "Folder" and "SubFolder"?" - No, it should not. The syntax of VBScript is well documented, you can look that one up.
- The exception is being thrown at that line because it has come across a folder that it can't handle - try debugging the script - the simplest way is to msgbox each folder name immediately after that line. Take note of the last one that was successful and then see what is wrong with the "next" folder.
Alternatively, paste the script into an Excel workbook VBA project (Alt-F11 in a blank spreadsheet). Move the main part of the script into a Sub, declare the variables used in the sub-functions and step through the code (F8) there - examine the variables in either the immediate or watch windows
Dim ObjXL As Object
Dim Row As Long, column As Long