Path: utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!mips!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!THUMPER.BELLCORE.COM!nsb From: nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) Newsgroups: comp.soft-sys.andrew Subject: Re: CUI update command, and messages questions. Message-ID: <4b0U4me0M2Yt49_6Jh@thumper.bellcore.com> Date: 27 Sep 90 13:40:02 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 36 Excerpts from internet.info-andrew: 26-Sep-90 Re: CUI update command, and.. MAG@ibm.com (2024) > Here is the problem. If I look at the folders via messages, it thinks > all the messages are unread (e.g. folderx (Mail; 20 new of 20)), but all > the messages have the check symbol next to them. I don't want the user > to have to traverse these old messages in order to bring the folder > header up to date (Mail;0 new of 20). Therefore, I thought I could use > the following command "cui update folderx ; skip 99; next; quit" to > bring the folder into sync. Is this right, or is there an easier method > to translate MH to AMS? Very interesting -- I'd never thought about this problem before, and nobody else who has written such conversion scripts seems to have mentioned it either. I don't think the skip 99 approach you described would really work very well, particularly with very large folders. However, if your script knows the number of messages in the folder (which it can find out pretty easily with something like NUMMSGS=`ls | wc`) you can probably do what you want with an ugly CUI command line like this one: cui set term 0 \; headers foldername \; set seenlast $NUMMSGS \; quit The trick here is that if you start out with "headers foldername", it will print all the captions out in order, and the last one will be numbered $NUMMSGS. "set seenlast" can then do what you want. (The "set term 0" just gets rid of "more mode" when it shows you all those headers.) Note also that this command will generate a lot of output, which can probably be sent to /dev/null. Hope that helps! -- Nathaniel PS -- To report the bug in short-name checkpoint files, send mail to info-andrew-bugs+@andrew.cmu.edu. I think Craig answered your other question about starting up the Messages program. Good luck! -- Nathaniel