Search found 2 matches
- 18 Jun 2013 17:02
- Forum: DOS Batch Forum
- Topic: count lines of files in dir: if file has only 1 line - move
- Replies: 3
- Views: 2378
Re: count lines of files in dir: if file has only 1 line - m
Thanks Foxidrive ! It works.....up until the 'Find'. Find is not picking up the # of rows as Var. BUT I tweaked the 'Find' piece so it works perfect: ('find /c /v "" "%%a"') ....to: ('find /c /v "" ^< "%%a"') this works.... @echo off for %%a in (*.csv) do ( fo...
- 17 Jun 2013 16:16
- Forum: DOS Batch Forum
- Topic: count lines of files in dir: if file has only 1 line - move
- Replies: 3
- Views: 2378
count lines of files in dir: if file has only 1 line - move
Hi - 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. ...