Re: Path / Listing and os.walk problem.

2010-08-26 Thread Peter Otten
Alban Nona wrote: Hi So here is my problem: I have my render files that are into a directory like this: c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0001.exr c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0002.exr c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0003.exr

Re: Path / Listing and os.walk problem.

2010-08-26 Thread Alban Nona
Hey ! Thank you guys ! It help me a lot ! @Dennis (Gomes): Thanks ! I tried it it worked well but list me the whole files :P (and finally crashed python...lol) I looked at the Peter method and, Im really dumb to didnt tough about defining a pattern like *_v001.0001.exr * like this, it sort me

Re: Path / Listing and os.walk problem.

2010-08-26 Thread Alban Nona
So I found a way to do it, maybe some people could be interested: listNames = [] for n in names: listNames.append('_'.join(n.split('_')[:-1])) #It will cut the last part of the file name convention listNames = list(set(listNames)) #we Delete duplicates from the list, like this we only have

Path / Listing and os.walk problem.

2010-08-25 Thread Alban Nona
Hi So here is my problem: I have my render files that are into a directory like this: c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0001.exr c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0002.exr c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0003.exr