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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -