Jump to content
VollachR

Check certain values according to another value in the same array?

Recommended Posts

VollachR

Hi,

I'm looking for a way to take a number value from a Row2 of a 2D array and according to this check if files that appear in rows 3-11 in the array exists.

For example, if the number in Row2 is 5 I need to check for the files in Row 3-6 only, if it is 6 than rows 3-7 and so on.

I thought on using a FOR loop but I have very little experience with those.

Can you suggest the best way to do what I need?

BTW, the files in Rows 3-11 will usually have blank value for any row above the number in Row2 (e.g. Row2 = 5 so Rows3-6 will have values but 8-11 be empty), The values I need are in Column 1 of the array, the name of the key from the INI file that the array was created from is in Column 0.

Full Example:

Row2 of Array:

Col0 = Games# - Col1 = 5

Rows3-6

Col0 = Exe2 - Col1 = Path To File

Col0 = Exe3 - Col1 = Path To File

Col0 = Exe4 - Col1 = Path To File

Col0 = Exe5 - Col1 = Path To File

I need that if Row2 is 5 to check these above for rows if the file exists, if it was 6 then the next row as well and so on up until number 10 in Row2 as it can't go above 10.

So basically for whatever number in Row2 from 2-10 need to check 1-9 rows from 3-11 to see if the files in Col1 exists and if any of them don't exist it should call a function that shows an error message.

I'm pretty sure I have the first line of the for look correct:

For $i = 1 To $aAIO[2][1]

Just not sure how to continue from there, also not sure if $i should be equal 1 or 2.

Help will be appreciated.


Ron Vollach
Microsoft Certified Professional (MCP)
Creator of Ultimate Conversion Compressor (UCC)
UCC Wikia

Share this post


Link to post
Share on other sites
Subz

Is this for game automation?  Can't help if it is.

Share this post


Link to post
Share on other sites
VollachR
1 minute ago, Subz said:

Is this for game automation?  Can't help if it is.

No, it's a compression script that let you compress games to smaller size, it's a feature that verify the correct folder is selected by one or more executable checks


Ron Vollach
Microsoft Certified Professional (MCP)
Creator of Ultimate Conversion Compressor (UCC)
UCC Wikia

Share this post


Link to post
Share on other sites
VollachR

OK, played around with it, the following seems to work, can somebody let me know if this code appears to be correct?

For $i = 3 To $aAIO[2][1] + 1               
                If Not FileExists($SourceDir & "\" & $aAIO[$i][1]) Then
                    AIOExeError()
                EndIf
            Next

The file paths in the array are relative to the Source folder in the $SourceDir variable


Ron Vollach
Microsoft Certified Professional (MCP)
Creator of Ultimate Conversion Compressor (UCC)
UCC Wikia

Share this post


Link to post
Share on other sites
Subz
Posted (edited)

Does your array look like:

#include <Array.au3>
Global $sSourceDir = "C:\"
Global $aPaths[7][2] = [["Paths#", 5], ["Path1.exe", "Path1"], ["Path2.exe", "Path2"], ["Path3.exe", "Path3"], ["Path4.exe", "Path4"], ["Path5.exe", "Path5"], ["Path6.exe", "Path6"]]
;~ The following will loop from Row 2 to the Last item in the Array
For $i = 2 To UBound($aPaths) - 1
    ;~ Check $sSourceDir & Row x Column1
    ;~ nb: If you don't have a backslash on $sSourceDir you will need to add it.
    If FileExists($sSourceDir & $aPaths[$i][1]) = 0 Then AIOExeError()
Next
_ArrayDisplay($aPaths)

 

Edited by Subz

Share this post


Link to post
Share on other sites
VollachR
Posted (edited)
44 minutes ago, Subz said:

Does your array look like:

#include <Array.au3>
Global $sSourceDir = "C:\"
Global $aPaths[7][2] = [["Paths#", 5], ["Path1.exe", "Path1"], ["Path2.exe", "Path2"], ["Path3.exe", "Path3"], ["Path4.exe", "Path4"], ["Path5.exe", "Path5"], ["Path6.exe", "Path6"]]
;~ The following will loop from Row 2 to the Last item in the Array
For $i = 2 To UBound($aPaths) - 1
    ;~ Check $sSourceDir & Row x Column1
    ;~ nb: If you don't have a backslash on $sSourceDir you will need to add it.
    If FileExists($sSourceDir & $aPaths[$i][1]) = 0 Then AIOExeError()
Next
_ArrayDisplay($aPaths)

 

My array is created using IniReadSection So I guess so, something similar

Anyway, I think my little for loop I posted works but I'm having a problem stopping the loop before the last check if a file not exists and setting an error state.

There's a GUI with a START button that when clicked gets disabled and start these checks that if files exists continue to next part but I need a way to stop it without closing the GUI while re-enabling the Start button.

And I don't need to loop to last item in the array as some values may be empty in column 1, only till one row more than the number in Row2

 

Edited by VollachR

Ron Vollach
Microsoft Certified Professional (MCP)
Creator of Ultimate Conversion Compressor (UCC)
UCC Wikia

Share this post


Link to post
Share on other sites
Subz

You just use ExitLoop, I'm just trying to understand the logic when to exit the loop, I'm assuming something like:

#include <Array.au3>
Global $sSourceDir = "C:\"
Global $aAIO = IniReadSection(@ScriptDir & "\AIO.ini", "AIO")
    If @error Then Exit MsgBox(4096, "Error", "File not found.")
;~ The following will loop from Row 3 to the Last item in the Array
For $i = 3 To UBound($aAIO) - 1
    ;~ Check $sSourceDir & Column1
    ;~ nb: If you don't have a backslash on $sSourceDir you will need to add it.
;~  If FileExists($sSourceDir & $aAIO[$i][1]) = 0 Then AIOExeError()
    ;~ Check if Row x Column 0 equals EXE Row 2 Column 1 example EXE4 Then Exit Loop
    If $aAIO[$i][0] = "EXE" & $aAIO[2][1] Then ExitLoop MsgBox(4096, "Exit", "Exiting on Row: " & $i)
Next
_ArrayDisplay($aAIO)

 

Share this post


Link to post
Share on other sites
VollachR
Posted (edited)

OK, I think I solved it, this is the full function script:

 

Func CheckExe()
    If $aAIO[1][1] = 0 Then
        If Not FileExists($SourceDir & "\" & $aConversion[12][1]) Then
            $ErrorState = SetError(1)
            MsgBox($MB_ICONERROR, "Exe Not Found!", "The " & $aConversion[9][1] & " Executable Could Not Be Found In The Following Location:" & @CRLF & @CRLF & $SourceDir & "\" & $aConversion[12][1] & _
                    @CRLF & @CRLF & "Please Verify The Location is Correct, Once The Problem is Fixed You Can Try the Conversion Again.")
            If $ErrorState = 1 Then GUICtrlSetState($Start, $GUI_ENABLE)
        EndIf
    EndIf
    If $aAIO[1][1] = 1 Then
        If Not FileExists($SourceDir & "\" & $aConversion[12][1]) Then
            $ErrorState = SetError(1)
            AIOExeError()
            If $ErrorState = 1 Then GUICtrlSetState($Start, $GUI_ENABLE)
        Else
            For $i = 3 To $aAIO[2][1] + 1
                If Not FileExists($SourceDir & "\" & $aAIO[$i][1]) Then
                    $ErrorState = SetError(1)
                    AIOExeError()
                    If $ErrorState = 1 Then GUICtrlSetState($Start, $GUI_ENABLE)
                    ExitLoop
                EndIf
            Next
        EndIf
    EndIf
EndFunc   ;==>CheckExe

Func AIOExeError()
    MsgBox($MB_ICONERROR, "Exe(s) Not Found!", "One or More of The " & $aConversion[9][1] & " Executable Files Could Not Be Found In The Selected Source Folder" & @CRLF & @CRLF & _
            "Please Verify It is Correct, Once The Problem is Fixed You Can Try the Conversion Again.")
EndFunc   ;==>AIOExeError

If I did everything right it it should check column 1 of the array from row 3 to row number +1 than the value in Row 2 (so if row 2 value is 5 it will check up to row6) and if any of the files don't exist it should display the error, re-enable the start button and exit the loop, essentially stopping the script before the start button can call the next function without exiting it altogether.

Not sure if the SetError lines are really needed though.

Edited by VollachR

Ron Vollach
Microsoft Certified Professional (MCP)
Creator of Ultimate Conversion Compressor (UCC)
UCC Wikia

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • nooneclose
      By nooneclose
      How do I properly convert this to Autoit? This is a VBA macro that I recorded in Excel.
       ActiveSheet.Outline.ShowLevels RowLevels:=2 I need this to close my subtotal once it is finished. 
      any help will be greatly appreciated. 
    • iMacg3
      By iMacg3
      Hi,
      I was looking into a way to delete a registry key (not a specific value, an entire key) if it is present. I was considering using RegRead and RegDelete. However, RegRead appears to only read values, not just keys. Is there a way to delete an entire registry key if it is present? I have heard that the below function may help.
       
      #include-once ; #UDF# ======================================================================================================================= ; Title .........: Reads\Search the name of a Key\Subkey\Value ; AutoIt Version : 3.3.8.1 ; Language ......: English ; Description ...: Lists all Keys\Subkeys\Values in a specified registry key ; Author(s) .....: DXRW4E ; Notes .........: ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;~ _RegEnumKeyEx ;~ _RegEnumValEx ; =============================================================================================================================== #Region ;**** Global constants and vars **** Global Const $sValueTypes[12] = ["REG_NONE","REG_SZ","REG_EXPAND_SZ","REG_BINARY","REG_DWORD","REG_DWORD_BIG_ENDIAN","REG_LINK","REG_MULTI_SZ","REG_RESOURCE_LIST","REG_FULL_RESOURCE_DESCRIPTOR","REG_RESOURCE_REQUIREMENTS_LIST","REG_QWORD"] #EndRegion ;**** Global constants and vars **** ; #FUNCTION# ======================================================================================================================== ; Name...........: _RegEnumKeyEx ; Description ...: Lists all subkeys in a specified registry key ; Syntax.........: _RegEnumKeyEx($KeyName[, $iFlag = 0[, $sFilter = "*"]]) ; Parameters ....: $KeyName - The registry key to read. ; $iFlag - Optional specifies Recursion (add the flags together for multiple operations): ; |$iFlag = 0 (Default) All Key-SubKeys Recursive Mod ; |$iFlag = 1 All SubKeys Not Recursive Mod ; |$iFlag = 2 Include in ArrayList in the first element $KeyName ; |$iFlag = 16 $sFilter do Case-Sensitive matching (By Default $sFilter do Case-Insensitive matching) ; |$iFlag = 32 Disable the return the count in the first element - effectively makes the array 0-based (must use UBound() to get the size in this case). ; By Default the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) ; |$iFlag = 64 $sFilter is REGEXP Mod, See Pattern Parameters in StringRegExp ; |$iFlag = 128 Enum value's name (_RegEnumKeyEx Return a 2D array, maximum Array Size limit is 3999744 Key\Value) ; |$iFlag = 256 Reads a value data, this flag will be ignored if the $iFlag = 128 is not set ; $sFilter - Optional the filter to use, default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") ; Search the Autoit3 helpfile for the word "WildCards" For details. ; $vFilter - Optional the filter to use for ValueName, $vFilter will be ignored if the $iFlag = 128 is not set ; default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") Search the Autoit3 helpfile for the word "WildCards" For details. ; $iValueTypes - Optional, set Value Types to search (Default $iValueTypes = 0 Read All), $iValueTypes will be ignored if the $iFlag = 128 is not set ; (add the flags together for multiple operations): ; 1 = REG_SZ ; 2 = REG_EXPAND_SZ ; 3 = REG_BINARY ; 4 = REG_DWORD ; 5 = REG_DWORD_BIG_ENDIAN ; 6 = REG_LINK ; 7 = REG_MULTI_SZ ; 8 = REG_RESOURCE_LIST ; 9 = REG_FULL_RESOURCE_DESCRIPTOR ; 10 = REG_RESOURCE_REQUIREMENTS_LIST ; 11 = REG_QWORD ; Return values .: Success - Return Array List (See Remarks) ; Failure - @Error ; |1 = Invalid $sFilter ; |2 = No Key-SubKey(s) Found ; |3 = Invalid $vFilter ; |4 = No Value-Name(s) Found ; Author ........: DXRW4E ; Modified.......: ; Remarks .......: The array returned is one-dimensional and is made up as follows: ; $array[0] = Number of Key-SubKeys returned ; $array[1] = 1st Key\SubKeys ; $array[2] = 2nd Key\SubKeys ; $array[3] = 3rd Key\SubKeys ; $array[n] = nth Key\SubKeys ; ; If is set the $iFlag = 128 The array returned is 2D array and is made up as follows: ; $array[0][0] = Number of Key-SubKeys returned ; $array[1][0] = 1st Key\SubKeys ; $array[1][1] = 1st Value name ; $array[1][2] = 1st Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[1][3] = 1st Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[2][0] = 2nd Key\SubKeys ; $array[2][1] = 2nd Value name ; $array[2][2] = 2nd Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[2][3] = 2nd Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[n][0] = nth Key\SubKeys ; Related .......: _RegEnumValEx() ; Link ..........: ; Example .......: _RegEnumKeyEx("HKEY_CURRENT_USER\Software\AutoIt v3") ; Note ..........: ; =================================================================================================================================== Func _RegEnumKeyEx($KeyName, $iFlag = 0, $sFilter = "*", $vFilter = "*", $iValueTypes = 0) If StringRegExp($sFilter, StringReplace("^\s*$|\v|\\|^\||\|\||\|$", Chr(BitAND($iFlag, 64) + 28) & "\|^\||\|\||\|$", "\\\\")) Then Return SetError(1, 0, "") Local $IndexSubKey[101] = [100], $SubKeyName, $BS = "\", $sKeyList, $I = 1, $sKeyFlag = BitAND($iFlag, 1), $sKeyFilter = StringReplace($sFilter, "*", "") If BitAND($iFlag, 2) Then $sKeyList = @LF & $KeyName If Not BitAND($iFlag, 64) Then $sFilter = StringRegExpReplace(BitAND($iFlag, 16) & "(?i)(", "16\(\?\i\)|\d+", "") & StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace($sFilter, "[^*?|]+", "\\Q$0\\E"), "\\E(?=\||$)", "$0\$"), "(?<=^|\|)\\Q", "^$0"), "\*+", ".*") & ")" While $I $IndexSubKey[$I] += 1 $SubKeyName = RegEnumKey($KeyName, $IndexSubKey[$I]) If @error Then $IndexSubKey[$I] = 0 $I -= 1 $KeyName = StringLeft($KeyName, StringInStr($KeyName, "\", 1, -1) - 1) ContinueLoop EndIf If $sKeyFilter Then If StringRegExp($SubKeyName, $sFilter) Then $sKeyList &= @LF & $KeyName & $BS & $SubKeyName Else $sKeyList &= @LF & $KeyName & $BS & $SubKeyName EndIf If $sKeyFlag Then ContinueLoop $I += 1 If $I > $IndexSubKey[0] Then $IndexSubKey[0] += 100 ReDim $IndexSubKey[$IndexSubKey[0] + 1] EndIf $KeyName &= $BS & $SubKeyName WEnd If Not $sKeyList Then Return SetError(2, 0, "") If BitAND($iFlag, 128) <> 128 Then Return StringSplit(StringTrimLeft($sKeyList, 1), @LF, StringReplace(BitAND($iFlag, 32), "32", 2)) $sKeyList = _RegEnumValEx(StringSplit(StringTrimLeft($sKeyList, 1), @LF), $iFlag, $vFilter, $iValueTypes) Return SetError(@Error, 0, $sKeyList) EndFunc ; #FUNCTION# ======================================================================================================================== ; Name...........: _RegEnumValEx ; Description ...: Lists all values in a specified registry key ; Syntax.........: _RegEnumValEx($KeyName[, $iFlag = 0[, $sFilter = "*"]]) ; Parameters ....: $KeyName - The registry key to read Or one-dimensional array RegKeyList ; use _RegEnumKeyEx() to get $RegKeyList (example $RegKeyList = [3, 1st Key\SubKeys, 2st Key\SubKeys, nth Key\SubKeys]) ; |$iFlag = 16 $sFilter do Case-Sensitive matching (By Default $sFilter do Case-Insensitive matching) ; |$iFlag = 32 Disable the return the count in the first element - effectively makes the array 0-based (must use UBound() to get the size in this case). ; By Default the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) ; |$iFlag = 64 $sFilter is REGEXP Mod, See Pattern Parameters in StringRegExp ; |$iFlag = 256 Reads a value data ; $sFilter - Optional the filter to use, default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") ; Search the Autoit3 helpfile for the word "WildCards" For details. ; $iValueTypes - Optional, set Value Types to search (Default $iValueTypes = 0 Read All) ; (add the flags together for multiple operations): ; 1 = REG_SZ ; 2 = REG_EXPAND_SZ ; 3 = REG_BINARY ; 4 = REG_DWORD ; 5 = REG_DWORD_BIG_ENDIAN ; 6 = REG_LINK ; 7 = REG_MULTI_SZ ; 8 = REG_RESOURCE_LIST ; 9 = REG_FULL_RESOURCE_DESCRIPTOR ; 10 = REG_RESOURCE_REQUIREMENTS_LIST ; 11 = REG_QWORD ; Return values .: Success - Return Array List (See Remarks) ; Failure - @Error ; |3 = Invalid $sFilter ; |4 = No Value-Name(s) Found ; Author ........: DXRW4E ; Modified.......: ; Remarks .......: The array returned is 2D array and is made up as follows: ; $array[0][0] = Number of Key-SubKeys returned ; $array[1][0] = 1st Key\SubKeys ; $array[1][1] = 1st Value name ; $array[1][2] = 1st Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[1][3] = 1st Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[2][0] = 2nd Key\SubKeys ; $array[2][1] = 2nd Value name ; $array[2][2] = 2nd Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[2][3] = 2nd Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[n][0] = nth Key\SubKeys ; Related .......: _RegEnumKeyEx() ; Link ..........: ; Example .......: _RegEnumValEx("HKEY_CURRENT_USER\Software\AutoIt v3") ; Note ..........: ; =================================================================================================================================== Func _RegEnumValEx($aKeyList, $iFlag = 0, $sFilter = "*", $iValueTypes = 0) If StringRegExp($sFilter, "\v") Then Return SetError(3, 0, "") If Not IsArray($aKeyList) Then $aKeyList = StringSplit($aKeyList, @LF) Local $aKeyValList[1954][4], $iKeyVal = Int(BitAND($iFlag, 32) = 0), $sKeyVal = 1953, $sRegEnumVal, $iRegEnumVal, $RegRead = BitAND($iFlag, 256), $vFilter = StringReplace($sFilter, "*", "") If Not BitAND($iFlag, 64) Then $sFilter = StringRegExpReplace(BitAND($iFlag, 16) & "(?i)(", "16\(\?\i\)|\d+", "") & StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace($sFilter, "[^*?|]+", "\\Q$0\\E"), "\\E(?=\||$)", "$0\$"), "(?<=^|\|)\\Q", "^$0"), "\*+", ".*") & ")" For $i = 1 To $aKeyList[0] $iRegEnumVal = 0 While 1 If $iKeyVal = $sKeyVal Then If $sKeyVal = 3999744 Then ExitLoop $sKeyVal *= 2 ReDim $aKeyValList[$sKeyVal + 1][4] EndIf $aKeyValList[$iKeyVal][0] = $aKeyList[$i] $iRegEnumVal += 1 $sRegEnumVal = RegEnumVal($aKeyList[$i], $iRegEnumVal) If @Error <> 0 Then If $iRegEnumVal = 1 And $vFilter = "" Then $iKeyVal += 1 ExitLoop EndIf $aKeyValList[$iKeyVal][2] = $sValueTypes[@Extended] If BitAND(@Extended, $iValueTypes) <> $iValueTypes Then ContinueLoop If $vFilter And Not StringRegExp($sRegEnumVal, $sFilter) Then ContinueLoop $aKeyValList[$iKeyVal][1] = $sRegEnumVal If $RegRead Then $aKeyValList[$iKeyVal][3] = RegRead($aKeyList[$i], $sRegEnumVal) $iKeyVal += 1 WEnd Next $sRegEnumVal = $iKeyVal - Int(BitAND($iFlag, 32) = 0) If Not $sRegEnumVal Or ($sRegEnumVal = 1 And $vFilter = "" And $aKeyValList[$iKeyVal - $sRegEnumVal][2] = "") Then Return SetError(4, 0, "") ReDim $aKeyValList[$iKeyVal][4] If Not BitAND($iFlag, 32) Then $aKeyValList[0][0] = $iKeyVal - 1 Return $aKeyValList EndFunc Thanks.
       
    • great77
      By great77
      ; put the root in a variable $sRoot = "C:\Project\PHexample\" Global $sCurrentTime = _NowCalc() ; We can use that variable here Global $aList = _FileListToArray($sRoot, Default, 2) If @error Then Exit ;;;;;;MsgBox(0, "Error", "_FileListToArray returned @error = " & @error) ;;;;;;;;;;;This is a loop that runs from 1 to the number of items listed in the first element of the returned  array For $i = 1 To UBound($aList) - 1     MsgBox(0, "Folder date", $sRoot & "" & $aList[$i] & @CRLF & @CRLF & FileGetTime($sRoot & "" & $aList[$i], 1, 1))     MsgBox(0, "Folder date", FileGetTime($sRoot & "" & $aList[$i], 1, 1))      $a_filenew = StringReplace(StringReplace(StringReplace(_NowCalc(), "/", ""), ":", ""), " ", "")       MsgBox(0, "Folder date", $a_filenew) $adex =  _DateDiff('D', FileGetTime($sRoot & "" & $aList[$i], 1, 1), $a_filenew)  MsgBox(0,"ade", $adex) Next I have a code as seen above, but the difference in time is returning zero. I understand that the date yyyymmddhhmmss but how can I find the difference.
      The purpose is to try find the difference in days. Any suggestion?  
    • TrashBoat
      By TrashBoat
      So i have been working on this 2d physics game and added some physics to it but got stuck on this problem that the character ( the cube ) is sliding all the time but it should not do that because of this friction function:
      If $horizontalVelocity > 0 Then If $inAir Then $currFriction = $airFriction $horizontalVelocity -= $currFriction $birbX += $horizontalVelocity EndIf this line "$horizontalVelocity -= $currFriction" should nullify the velocity to 0 but it stays somewhere in 0.09. How do i fix this?
      Here's the game's source code and what i have done so far:
      Now i don't expect you reading my nasty code and understanding what it does but any help would be appreciated.
       
      Edit: I guess the problem is solved, i have updated the source code if anyone needs it.
    • Dzenan03
      By Dzenan03
      I want to make a while loop, that creates variables based on a array. For thist I created the array $iDsO with the number and the name of folders in an other folder. Every folder has a different name an I want to create variables(arrays) for each folder that show me all the files in that folder. For example: I have the Folder \Folder1. In it there are the Folders \1, \2, \3. In 1, 2 and 3 there are some files(.png). The array for Folder1 is $iDsO and now I want to crate the arrays $iDsO1, $iDsO2 and $iDsO3 with the files in them can I make something like this:
      While $iDs > 0 ;$iDs is the number of files in Folder1>> $iDsO[0] $iDs#here should come the Foldername for example '1'# = _FileListtoArray(@ProgramFilesDir&"\Folder1\"&$iDsO[$iDs]) $iDs = $iDs - 1 Wend So that in the End I have three variabels ($iDs1, $iDs2 and $iDs3)
       
      Is this posible or if not what could I do instead ( I don´t know the number of folders in Folder1 in the begining).
×