rem ----- list subfolders for /r /D j:\taqDAILYNBBO\ %x in (*) ( rem ----- list all files in the subfolder for %x %y in (*) ( echo ticker= %y ) ) This produces an error -- what am I doing wrong?