What would be the simplest way to make a large text file (>60MB) filled with random data (words, letters, logs, anything)? I'm not looking to create fake sparse files. I need a way to make massive ammounts of useless random text to be outputted in a .txt file.
At first I was going to use WEVTUtil query-events Security /rd:true /format:text > eventlog.txt but turns out it's not enough (only 31MB of data). I'm looking for better ideas.
Also, if it could be a one-liner, it would be awesome.
Any thoughts guys?
Best way to make a large text file?
Moderator: DosItHelp
Re: Best way to make a large text file?
Two ways that I know of but neither of these are by no means random.
1) Use FSUTIL.
This just creates an empty file with a bunch of carriage returns and line feeds.
2) This one just creates a file with the same character repeated several times which I got from Dave many years ago for doing Binary Compares.
You could make it a bit more random looking by changing the SET /P command.
1) Use FSUTIL.
Code: Select all
fsutil file createnew C:\testfile.txt 1000
This just creates an empty file with a bunch of carriage returns and line feeds.
2) This one just creates a file with the same character repeated several times which I got from Dave many years ago for doing Binary Compares.
Code: Select all
::Build a dummy file with length 32kbytes to do a binary compare with
::This file could be made larger or smaller, depending on requirements
<nul set /p ".=A" >dummy.txt
for /l %%n in (1 1 15) do type dummy.txt >>dummy.txt
You could make it a bit more random looking by changing the SET /P command.
Code: Select all
<nul set /p ".=AZM#$1903" >dummy.txt
Re: Best way to make a large text file?
You need something like this: http://www.lipsum.com/
That would be great for tests but I needed something directly in batch.
Two ways that I know of but neither of these are by no means random.
2) This one just creates a file with the same character repeated several times which I got from Dave many years ago for doing Binary Compares.
That one is superb.
Thank you so much.
Re: Best way to make a large text file?
You may execute this command twice, and redirect all output:Olyrd wrote:At first I was going to use WEVTUtil query-events Security /rd:true /format:text > eventlog.txt but turns out it's not enough (only 31MB of data). I'm looking for better ideas.
Code: Select all
> "eventlog.txt" (
WEVTUtil query-events Security /rd:true /format:text
WEVTUtil query-events Security /rd:true /format:text
)
penpen
Re: Best way to make a large text file?
Here is a .bat file to generate such random text files.
http://www.howtogeek.com/137039/how-to- ... rish-text/
Saso
http://www.howtogeek.com/137039/how-to- ... rish-text/
Saso