list = dir('*.avi')
for k = 1:length(list)
reader = VideoReader(list.name(k));
[~,name] = fileparts(list.name(k));
outfile = strcat(name,'.csv')
By the way, I see this is a follow up to your earlier question. Sorry I didn't see that you had left this as a comment in that thread. For continuity, might be better next time to try sending one more comment to ask if anyone had any further ideas. That way if I missed it the first time I might see it and be able to follow up.