home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!att-out!rutgers!ub!zaphod.mps.ohio-state.edu!wupost!crcnis1.unl.edu!moe.ksu.ksu.edu!usenet-feed.cc.umr.edu!mcs213d.cs.umr.edu!mcastle
- From: mcastle@mcs213d.cs.umr.edu (Michael R Castle)
- Newsgroups: comp.os.msdos.misc
- Subject: Re: echo >> gives erroneous results
- Message-ID: <1992Nov7.033213.8198@umr.edu>
- Date: 7 Nov 92 03:32:13 GMT
- References: <1992Oct22.160130.28244@galileo.cc.rochester.edu> <1992Oct23.225646.6288@rei.com> <1992Nov6.122053.1@sc2a.unige.ch>
- Sender: cnews@umr.edu (UMR Usenet News Post)
- Organization: University of Missouri - Rolla
- Lines: 32
- Nntp-Posting-Host: mcs213d.cs.umr.edu
-
- In article <1992Nov6.122053.1@sc2a.unige.ch> fisher@sc2a.unige.ch writes:
- >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!
-
- If you just want to get rid of ^Z for any other reason, try:
-
- type autoexec.bat > autoexec.tmp
- del autoexec.bat
- ren autoexec.tmp *.bat
-
-
- mrc
-