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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
kvsblogs
Posts: 4
Joined: 04 Nov 2013 13:11

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

#1 Post by kvsblogs » 04 Nov 2013 17:34

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..

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

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

#2 Post by foxidrive » 04 Nov 2013 18:18

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

Post Reply