Code: Select all
#SingleInstance Force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Quote := chr(34) ; " karakter
Replace_text := """,""" ; "," string
Filelist := {}
FileSelectFolder, F1P,
iL1 := strlen(F1P)
parentfolder := F1P . "\*.*"
loop, files, %parentfolder%, DFR ; Collect Files
{
Splitpath,A_LoopFileFullpath,F1N,F1D
F1SD := substr(F1D,iL1+2)
F1M := A_LoopFileTimeModified
F1C := A_LoopFileTimeCreated
F1A := A_LoopFileAttrib
F1S := A_LoopFileSize
F1I := A_Index
oDir := StrSplit(F1SD,"\")
iLenoDir := oDir.Length()
if (instr(F1A,"D")) {
if (ilenoDir = 0)
FileList[F1N] := {}
if (ilenoDir = 1)
FileList[oDir[1],F1N] := {}
if (ilenoDir = 2)
FileList[oDir[1],oDir[2],F1N] := {}
} else {
if (ilenoDir = 0)
FileList[F1N] := F1A
if (ilenoDir = 1)
FileList[oDir[1],F1N] := F1A
if (ilenoDir = 2)
FileList[oDir[1],oDir[2],F1N] := F1A
}
}
MsgBox
ExitApp
However this code goes only 2 level deep, due to the way I coded the dimensions.
I wonder if there is something to avoid this like:
key := "oDir[1],oDir[2],F1N"
Filelist[%key%] := F1A
where %key% would be dynamically replaced by its value