Windows command line - write N characters to file with > operator -
could please tell if possible write file n characters using > operator
echo "helloooooo" > file.txt
will write whole string, there way write "he" example?
@echo off setlocal enableextensions set "_write=helloooooox" > file.txt ( rem extract first 2 characters: echo(%_write:~0,2% rem extract last 3 characters: oox echo(%_write:~-3% rem etc. etc. )
read entire set /?
or variables: extract part of variable (substring)
Comments
Post a Comment