I have a very large .txt file (6GB) that I need to break into several files. I'd like to run a powershell script that would copy lines 1 to 100,000 to a new file, then run it again for lines 100,001 to 200,000 and so on. I'm not a developer and I've been unable to figure out the syntax to get the job done. Any help will be appreciated.
I've tried with both Get-Content and Get-ChildItem
Get-Content C:\Users\alind\Downloads\2018\in.txt [5..10] | Set-Content C:\Users\alind\Downloads\2018\mid.txt
I'm looking for lines 6 to 11 in the file in.txt to be copied into the file mid.txt.