Use the concatenation output operator ">>":
dir "mydir" | findstr /e .csv >> newfile.csv
Quote:
Yeah I tried that and still got the same result.
Are you sure? Because when I try something very similar it works:
dir . | findstr /e .txt >> newfile.txt
As in:
D:\Temp>cd testdir
D:\Temp\testdir>dir
Volume in drive D is GriffData
Volume Serial Number is 4CA5-2F85
Directory of D:\Temp\testdir
01/11/2018 13:36 <DIR> .
01/11/2018 13:36 <DIR> ..
01/11/2018 13:36 652 x.txt
1 File(s) 652 bytes
2 Dir(s) 640,177,086,464 bytes free
D:\Temp\testdir>dir . | findstr /e .txt >> newfile.txt
D:\Temp\testdir>type newfile.txt
01/11/2018 13:47 0 newfile.txt
01/11/2018 13:36 652 x.txt
D:\Temp\testdir>dir . | findstr /e .txt >> newfile.txt
D:\Temp\testdir>type newfile.txt
01/11/2018 13:47 0 newfile.txt
01/11/2018 13:36 652 x.txt
01/11/2018 13:47 92 newfile.txt
01/11/2018 13:36 652 x.txt
D:\Temp\testdir>