Hi<br><br>So here is my problem:<br><br>I have my render files that are into a directory like this:<br><br>c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0001.exr<br>c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0002.exr<br>
c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0003.exr<br>....<br>c:\log\renderfiles\HPO7_SEQ004_031_VDM_AMB_V001.0001.exr<br>c:\log\renderfiles\HPO7_SEQ004_031_VDM_AMB_V001.0002.exr<br>c:\log\renderfiles\HPO7_SEQ004_031_VDM_AMB_V001.0003.exr<br>
<br>True is, there is like 1000 Files is the directory (C:\log\renderfiles\)<br><br>What Iam looking to is to extract the first part of the filenames as a list, but I dont want the script to extract it 1000times, I mean I dont need it<br>
to extract HPO7_SEQ004_031_VDM_AMB 150 times, because there is 150 Frames. (not sure if its clear tought)<br><br>so far, I would like the list to look lik:<br><br>["HPO7_SEQ004_031_VDM_DIF", "HPO7_SEQ004_031_VDM_AMB", etc...]<br>
<br><br>I start to think about that, to try to use a <br><br>for (path, dirs, files) in os.walk(path):<br> list.append(files)<br><br><br>but this kind of thing will just append the whole 1000 files, thing that I dont want, and more complicated I dont want the thing after "AMB" or "DIF" in the name files to follow.<br>
(thing I can delete using a split, if I read well ?)<br><br><br>I trying to search on internet for answer, but seems I find nothing about it.<br>Someone can help me with that please, show me the way or something ? <br><br>
Thank you ! :)<br>