jeudi 5 novembre 2015

How to iterate through set of files based on file names?

I have a set of files named like this:

qd-p8-dPZ-d8-z1-1nn.q             qq-p8-dZP-d8-z1-2nn.q
qd-p8-dPZ-d8-z1-2nn.q             qq-p8-dZP-d8-z1-4nn.q
qd-p8-dPZ-d8-z1-4nn.q             qq-p8-dZP-d8-z16-1nn.q
qd-p8-dPZ-d8-z16-1nn.q            qq-p8-dZP-d8-z16-2nn.q
qd-p8-dPZ-d8-z16-2nn.q            qq-p8-dZP-d8-z16-4nn.q
qd-p8-dPZ-d8-z16-4nn.q            qq-p8-dZP-d8-z16-8nn.q
qd-p8-dPZ-d8-z16-8nn.q            qq-p8-dZP-d8-z1-8nn.q
qd-p8-dPZ-d8-z1-8nn.q             qq-p8-dZP-d8-z2-1nn.q
qd-p8-dPZ-d8-z2-1nn.q             qq-p8-dZP-d8-z2-2nn.q
qd-p8-dPZ-d8-z2-2nn.q             qq-p8-dZP-d8-z2-4nn.q 
qd-p8-dPZ-d8-z2-4nn.q             qq-p8-dZP-d8-z2-8nn.q
qd-p8-dPZ-d8-z2-8nn.q             qq-p8-dZP-d8-z32-1nn.q
qd-p8-dPZ-d8-z32-1nn.q            qq-p8-dZP-d8-z32-2nn.q
qd-p8-dPZ-d8-z32-2nn.q            qq-p8-dZP-d8-z32-4nn.q
qd-p8-dPZ-d8-z32-4nn.q            qq-p8-dZP-d8-z32-8nn.q
qd-p8-dPZ-d8-z32-8nn.q            qq-p8-dZP-d8-z4-1nn.q
qd-p8-dPZ-d8-z4-1nn.q             qq-p8-dZP-d8-z4-2nn.q
qd-p8-dPZ-d8-z4-2nn.q             qq-p8-dZP-d8-z4-4nn.q

The information to iterate is given in the file names, for example:


dZP, 1nn, z2,  

and vary


with values

{d8, d16, d32 d64}

Then, increase z value to get

dZP, 1nn, z4

and vary d again

{d8, d16, d32 d64}   

Once I'm able to iterate like this I need to do some information processing from the files.

Aucun commentaire:

Enregistrer un commentaire