I've got a VBS file that I'm using to populate an excel spreadsheet with file names. I select the files (.pdf's or .slddrw's of mechanical drawings) and drop them on the script, it iterates through the files and puts them into the spreadsheet with their folders.
My problem is that I can only drop as many as 21 files at a time. Some of the assemblies I do have as many as a couple hundred parts (files).
The code I'm currently using is below, but is there a way to make it so I can drop more files?
I've been doing this by running a command window in the folder, doing a DIR /s /b *.pdf > files.txt then importing that into Excel, but it's too much work. (I'm lazy).
Thanks in advance.
My problem is that I can only drop as many as 21 files at a time. Some of the assemblies I do have as many as a couple hundred parts (files).
The code I'm currently using is below, but is there a way to make it so I can drop more files?
Code:
Dim arg, cnt
Set objExcel = CreateObject("Excel.Application")
If WScript.Arguments.Count = 0 Then
WScript.Echo "Drop files on this script to load into Excel spreadsheet."
Else
objExcel.Visible = True
objExcel.Workbooks.Add
For each arg in WScript.Arguments
cnt = cnt + 1
objExcel.Cells(cnt, 1).Value = arg
Next
End If
WScript.Quit(0)
I've been doing this by running a command window in the folder, doing a DIR /s /b *.pdf > files.txt then importing that into Excel, but it's too much work. (I'm lazy).
Thanks in advance.
Last edited: