How to split text file into multiple other files based on its contents
04:20 24 Feb 2026

I have a large tab-delimited text file with the following structure:

AAA.xyz
AAA.xyz
BBB.xyz
BBB.xyz
CCC.xyz
DDD.xyz
etc

I want to split this file into several other files, each called AAA.xyz, BBB.xyz, CCC.xyz, DDD.xyz, etc so that each file contains the but not the first (AAA.xyz) value;

e.g. if the first line is AAA.xyx12334567891022 I want to write 12334567891022 into the AAA.xyz file;

I used to be quite good at this sort of thing (many years ago!) using unix/linux shell scripting, but I'm kinda back to basics. My only tools right now are Windows 11 cmd line and Powershell, but I have very little experience with either - so I'm hoping for advice as to what is the minimum toolkit I need as well as how to crack my problem.

file split cut txt delimited