top of page

You can use the code first posted here, in order to count the number of lines in a multiple text or .csv files in a folder.

Simply put this copy in a text file in the folder containing the source files. Change to the extension to .bat and double-click it.

@echo off cls setlocal EnableDelayedExpansion set /a total=0 ( for %%f in (*.txt) do ( for /f %%a in ('type "%%f"^|find /C /v "" ') do set /a total+=%%a&echo %%f %%a ) echo total !total! )>>list.txt

GOTO :EOF

A new file named 'list.txt' will be generated showing the name of each source file and the number of lines in the file.

Confirmed the counts were correct in NotePad ++


 
 

You can use a simple Windows command to update your operating systems' settings. Running:

gpupdate /force

. . . in command prompt can adjust advanced network settings or make changes for a single user's computer.

The network admin can grant or block access to folder directories and applications with the group policy. Run this command if you don't have access to a location or software that you should have access to.


 
 

If you want to get a list of all of the files in a directory other than those with a given file extension you can do so using the findstr command with a /vi switch.

dir | findstr /v ".pdf"

The dir command feeds in a directory list to the findstr search command and the /v switch filters the data with the value listed in quotes.

In this example the 'MyData' folder has 10 pdf files which are excluded from the list that is generated.


 
 

Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page