home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!chx400!news.unige.ch!ugsc2a!fisher
- From: fisher@sc2a.unige.ch
- Subject: Re: echo >> gives erroneous results
- Message-ID: <1992Nov6.122053.1@sc2a.unige.ch>
- Lines: 24
- Sender: usenet@news.unige.ch
- Organization: University of Geneva, Switzerland
- References: <1992Oct22.160130.28244@galileo.cc.rochester.edu> <1992Oct23.225646.6288@rei.com>
- Date: Fri, 6 Nov 1992 10:20:53 GMT
-
- In article <1992Oct23.225646.6288@rei.com>, fox@rei.com (Fuzzy Fox) writes:
- > eric@prodigal.psych.rochester.edu (Eric Hansen) writes:
- >
- >>I have the following command in a batch file:
- >
- >>echo ccc >> c:\autoexec.bat
- >
- >>This *should* append the string "ccc" to the end of the autoexec.bat file
- >>in root dir of my c drive. Instead, it does nothing.
- >
- > Does AUTOEXEC.BAT have a Ctrl-Z character at the end?
-
- Probably...
-
- The solution to trick DOS into removing it is to use:
-
- echo ccc > to_add.tmp
- copy autoexec.bat + to_add.tmp
- del to_add.tmp
-
- This should work regardless of the number of ^Z in the file, but
- everything after the last ^Z will be lost, of course!
-
- Markus Fischer Dpt of Anthropology, Geneva CH fisher@sc2a.unige.ch
-