On 2016-12-12 20:07, Dr. Mark Bugeja MD wrote: > This is one recent instance where I described the structure of the > folders. Perhaps I should have stated: > > Each folder has a list of files + 3 /*sub*/folders, each with its own > list of files. Yes. I assumed (from your original post) that there could be any number of sub- folders, with arbitrary names, albeit (probably) all of form "rel" plus a five digit number. If those sub-folders are always present or at least are always meant to be then (if I'd been writing a script for myself) I'd have checked that each sample's folder contained the expected three sub-folders - no more and no fewer. But on the assumption that there could be any number of them, of any name, I would have done what Kevin did, & made the script just process whatever subfolders it found. Also, your original example of file/folder layouts had quite a lot of "etc"s in them, which implies that we weren't necessarily seeing the whole set of possibilities. And, your text said "Each subfolder has similarly names files as shown.", which is too vague for anyone (writing a script) to be certain of what you meant. On the other hand, I do see - now - that your description, eg: Basson16L ....rel00150 ........036-C ........037-C# ........038-D ........etc ....rel00600 ........036-C ........037-C# ........038-D ........etc ....rel99999 ........036-C ........037-C# ........038-D ........etc 036-C 037-C# 038-D etc did include separate files (the lines at the end of that list) as well as sub- folders. My only excuse for not realising their significance is that I thought (wrongly!) that you'd forgotten to put lots of dots in front of one set of names! On the other hand, there's no good reason to put the "main files" at the bottom of a list. They'd have been far more obvious if they'd been described first. If I'd been describing this structure to someone else I'd have said something like: For each set of samples, eg "Basson16" there's two folders named with "L" and "R" suffixes. Each contains some audio files, one for each note of the scale, named accordingly, eg "037-C#.wav" - representing the C sharp that's the 37th note counted from the lowest pitched one in the sample set (or whatever the significance of that number is). As well as the main data for each note there's three additional files, each holding data describing short, medium and long 'releases'. These are always stored in subfolders named "rel00150", "rel00600" and "rel99999". Whatever the set of main data files is, the subfolders should have the same named set of subsidiary files, so for example, as there's a 037-C#.wav file in the main folder there should be three more files with that name in the three relnnnnn folders. I would also have explained whether there could ever be any other files in the main or relnnnnn folders, which contain other things - eg any .txt files that contain descriptions of the data. Perhaps I'd also have said that all the individual files should have names that are a three digit number, a dash, and one of A A# B C C# D D# E F F# G G#. I might have said what the range of the three-digit numbers is: do they always start at 001, and always end at the (same) high value? Do they always go up in ones? What should the script do if there's a gap in the sequence? I'd then have listed the full names (paths) of all the files describing one note for one sample eg: C:\my\organsamples\basson16l\037-C#.wav C:\my\organsamples\basson16l\rel00150\037-C#.wav C:\my\organsamples\basson16l\rel00600\037-C#.wav C:\my\organsamples\basson16l\rel99999\037-C#.wav C:\my\organsamples\basson16r\037-C#.wav C:\my\organsamples\basson16r\rel00150\037-C#.wav C:\my\organsamples\basson16r\rel00600\037-C#.wav C:\my\organsamples\basson16r\rel99999\037-C#.wav which hopefully would have removed some of the vagueness. Notice, no unnecessary dots, and the full names (with the ".wav" extensions) of the files. -- Jeremy Nicoll - my opinions are my own ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Sox-users mailing list Sox-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/sox-users