I\'m attempting to write an ASCII null character (nul) to a file from a Windows batch script without success. I initially tried using echo like this:
I don't like the solution that cannot be easy copy/paste-d to text files.So few more ways:
1) mshta (can be directly used in batch file or from command line):
mshta vbscript:execute("CreateObject(""Scripting.FileSystemObject"").GetStandardStream(1).Write( Chr(00) ):Close")>testfile
2) certutil (requires a temp file)
echo 00>null.hex
certutil -decodehex null.hex null.bin
3) makecab just check the subroutine here - http://ss64.com/nt/syntax-genchr.html