Home > OS >  Consult the batch file content split and generate a new file
Consult the batch file content split and generate a new file

Time:09-19

There is a file, content of 0123456789

Want to every two content to generate a new file

For example,
01 is saved as a 1. TXT
23 saved as 2. TXT
45 is saved as a 3. TXT
,,,,,,,,

Thank you very much!

CodePudding user response:

What file??

CodePudding user response:

Bin file, after break up is also a bin file
I said above TXT is an example

CodePudding user response:

Want to use this method of intercepting string split
Set the STR=123456789
STR: echo % % ~ 0, 2

But want to replace with variable to 0, 2, intercepts a different position every time
Such as the definition set start=0
Echo % STR: start ~ % %, 2%
But the effect is wrong, don't know how to use variables to replace
Or have other method to

CodePudding user response:

The bin file command-line processing not
A text file, please study the tokens for/f options
  • Related