我做的提取文件名的小程序,提取后写在excel里,但当文件有一两千个就出错了,我觉得是数组超限了,不知咋解决#Include <File.au3>
#Include <Array.au3>
#Include <Excel.au3>
$name = FileOpenDialog("选择文件", @WorkingDir & "", "所有文件 (*.*)", 1 + 4 )
If @error=1 Then
MsgBox(0,"提示","文件选择失败!程序退出!")
Exit
EndIf
$FileList=StringSplit($name,"|")
Local $array[UBound($FileList)]
$j=0
For $i=0 To UBound($FileList)-2
$Filename=StringRegExp($FileList[$i+1],"(.*)\.",3)
If @error=0 Then
$array[$j]=$Filename[0]
$j=$j+1
EndIf
Next
$oExcel = _ExcelBookNew()
_ExcelWriteArray($oExcel, 1, 1, $array,1)
|