[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: 1A EOF character (III+) revisited

Recently, for reasons too obscure to mention, I had occasion to
want to strip the 1A character from the end of a III+ file.
Heretofor, I'd used Norton diskedit to replace the 1A with a
space. But since diskedit chokes on Windows 95, I decided to try
Harry's macro:

BX dos/nv /c copy /a  killhtm /bQ2
BX delete Q2
BX rename killhtm Q2

Under dos 6.22 (and various earlier incarnations) - it don't
work. (Or it don't work for me) - I understand what the macro is
trying to do, but the /b switch uses the reported file size to
decide how many bytes to save - and since the size of "file"
includes the 1A, its going to continue to preserve the 1A in the
"file1" result until the keyboard wears out.

In hopes that future archeologists will find this of interest,
here's something that works: (III+ and dos 6.22)

1. use dos to create a 1-byte file consisting of only a space
  c:>copy con eofspc

2. macro to eliminate (replace) the eof 1a:
  BCdos /c copy  + eofspc kill1a /bXC
  BCernv XC
  BCrename kill1a XC

now the copy command reads up to (but not including) the 1a
before concatenating with the 1-byte eofspc file and then saves
the resulting combination without an eof character.

(Get a life) Solla