@echo off for /R "E:\WorkPlace\TFS\JinRi.Air\Release" %%s in (*) do ( echo %%s >>E:\WorkPlace\TFS\JinRi.Air\Release\outfilelist.txt)