Welcome Guest.   Make a donation to an author on the site April 19, 2014, 12:12:13 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: how to delete text files that have less than x lines  (Read 1793 times)
kalos
Member
**
Posts: 977

View Profile Give some DonationCredits to this forum member
« on: September 11, 2007, 08:15:19 AM »

hello

how can I delete all the text files that have less than 3 lines inside a folder?

thanks
Logged
matt_man22
Honorary Member
**
Posts: 11

View Profile Give some DonationCredits to this forum member
« Reply #1 on: September 12, 2007, 01:20:22 PM »

I assume you are using Windows?

I know in linux it is a simple "wc -l" command.  Maybe that could help in some way.  Not sure how to do it in Windows.
Logged
AbteriX
Charter Honorary Member
***
Posts: 1,021


Member #520

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: September 12, 2007, 04:39:08 PM »

There are unix-tools-for-windows packs available and there are wc.exe included.

With plain DOS commands this is a lill bit difficult,
maybe "for /f" could help, loop this three times and if errorlevel >0 then delete this file <???>

Real solution would be an AutoHotkey script .... but you have asked this there already, so i will wait what happens.
Logged

Greetings, Stefan.
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.031s | Server load: 0.05 ]