I need help to get a batch file working.
About 80 .csv files get dumped into a directory each day to be loaded to a dB.
But many of the files have only 1 line (header). Those 1-line files need to
be moved to a directory '/archive,' leaving the greater than 1-line files in place.
I need to :
1. get line count of each file
2. write each <filename> & <row_count> to a file ("filelist.txt")
3. move files with only 1-line to '/archive'
What I have working is . . .
Code: Select all
find /c /v "" *.csv >filelist.txt
I know it's got to be fairly basic. I've been all over the (really well done) DosTips areas but can't make anything work.
How do I get this to work with a logical comparison to only move the 1-line files?
thanks-