function stepOneDown(fns,curdir,rundir,depth,cntr)
depth=[depth '*'];
cd(curdir)
fns=dir;
fns=fns(3:end);
for i=1:length(fns)
    cd(curdir)
    if fns(i).isdir==1
        disp([depth fns(i).name])
        stepOneDown(fns(i),[curdir filesep fns(i).name],rundir, depth, cntr)
    else
        writeFile(curdir,fns(i),rundir,cntr)
    end
end

