Files to Ruby droplist?
Posted: Thu Jun 16, 2016 1:12 pm
I have been searching online about this but no luck, basically what I am after is: to scan a specific directory (and sub directories) for text files, then convert the structure into a string that the droplist understands. So lets say I have some files:
C:\Folder\Category01\01.txt
C:\Folder\Category01\02.txt
C:\Folder\Category02\03.txt
C:\Folder\Category02\04.txt
and it converts it to something like this:
Folder,
<<,Category01,>>,
<<,<<,01,>>,>>,<<,<<,02,>>,>>,
<<,Category02,>>,
<<,<<,03,>>,>>,<<,<<,04,>>,>>
It seems very simple but for us with little Ruby knowledge seems the hardest thing to do
Anyone care to give a hand?
C:\Folder\Category01\01.txt
C:\Folder\Category01\02.txt
C:\Folder\Category02\03.txt
C:\Folder\Category02\04.txt
and it converts it to something like this:
Folder,
<<,Category01,>>,
<<,<<,01,>>,>>,<<,<<,02,>>,>>,
<<,Category02,>>,
<<,<<,03,>>,>>,<<,<<,04,>>,>>
It seems very simple but for us with little Ruby knowledge seems the hardest thing to do
Anyone care to give a hand?