Page 1 of 1

How to read a large (>10GB) text file using Windows Batch?

Posted: 04 Nov 2013 17:34
by kvsblogs
I am fairly new to batch scripting and was able to create a large text file (>10 GB) by appending a smaller 1 MB file.

I am using the below FOR-IN-DO syntax to try and read it and echo the output to the DOS screen:

for /f "tokens=* delims=" %%x in (dummy.txt) do echo %%x

However, the FOR-IN-DO cannot seem to read more than ~1.3GB files. Is there a workaround for this problem? Please provide your valuable suggestions.

I need to able to monitor the system performance while reading a large (>10 GB) file..

Re: How to read a large (>10GB) text file using Windows Batc

Posted: 04 Nov 2013 18:18
by foxidrive
This will read the file, and avoid the slowdown by listing to the console, by redirecting the output to nul.


Code: Select all

type "file.txt" >nul