How do I get a list of files (*.jpg) from all folders, using Script-FU in GIMP?
(let* ((filelist (cadr (file-glob pattern 1)))
This only gets files from the current folder.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will be a bit complicated, but it can be done. The list of files which file-glob returns for the current directory includes subdirectories. So you can use that list to recursively build more glob strings, which can be passed to file-glob, and so on.
This works, but it is slow. Perhaps you can find a way to make it faster?
By the way, this returns all files, not just JPGs. To make it return only JPGs, modify the line which says “(append files (search-dirs files))”. Rather than appending “files”, filter out the JPGs and append those only.