Func archiveDir($dir)
; Get all the files under the current dir
$allOfDir = _FileListToArray($dir)
Local $countDirs = 0
Local $countFiles = 0
$imax = UBound($allOfDir)
For $i = 0 to $imax - 1
If StringInStr(FileGetAttrib($allOfDir[$i]),"D") Then
$countDirs = $countDirs + 1
Else
$countFiles = $countFiles + 1
EndIf
Next
Local $allDirs[$countDirs]
Local $allFiles[$countFiles]
The error text is : "Array variable subscript badly formatted." and comes on this line:
Local $allDirs[$countDirs]
Any ideas?