Not sure if this is possible but I was wanting to allow users to have different sets of cards for the SexCards script. It would be handy for the script to be able to detect new card files was trying something like:
Code:
import groovy.io.FileType
def list = []
def dir = new File("scripts/Sex_Cards")
dir.eachFileRecurse (FileType.FILES) { file ->
list << file
}
def file_list = ""
list.each {
file_list += it.path
}
But it was not happy. Anyone have any ideas? It may also be nice in some other scripts for selecting random images etc..