Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Clean out Eudora mailboxes

222 views
Skip to first unread message

Howard Kaikow

unread,
Apr 8, 2007, 9:00:48 AM4/8/07
to
I've got a few hundred Eudora mailboxes.
I'd like to maintain the same mailboxes, but delete ALL messages.

Is the following best?

1. Use Windows Explorer to go to the Eudora mailbox directory.
2. Use Search, in Windows Explorer, to find all *.mbx files.
3. Delete then all.
4. Start Eudora to rebuild the indexes.

--
http://www.standards.com/; See Howard Kaikow's web site.


Citizen Bob

unread,
Apr 8, 2007, 10:23:19 AM4/8/07
to
On Sun, 8 Apr 2007 09:00:48 -0400, "Howard Kaikow"
<kai...@standards.com> wrote:

>I've got a few hundred Eudora mailboxes.
>I'd like to maintain the same mailboxes, but delete ALL messages.
>
>Is the following best?
>
>1. Use Windows Explorer to go to the Eudora mailbox directory.
>2. Use Search, in Windows Explorer, to find all *.mbx files.
>3. Delete then all.
>4. Start Eudora to rebuild the indexes.

You did not affect the indexes ".toc" files. They remain intact after
deleting the associated ".mbx" files. And running Eudora does not
restore the mbx files.

While there are many ways to accomplish what you want, possibly the
easiest is to do the following:

Close Eudora. This goes without saying, but I mention it because it is
easy to overlook.

Open a DOS window (Start -> Run -> "cmd" (without quotes) ).

From the root directory create a new directory called "backup" or
somesuch.

Change directory to the directory where the mbx files are located. I
will call this the "Eudora directory" even though it may not be
"C:\Eudora" in your installation.

Back up the mbx files from the Eudora directory to the new "backup"
directory in case you screw up them up.

Create an empty text file ("copy con empty.txt", CTRL-Z. Enter).

Build a batch file that contains the fill list of all *.mbx.

dir /b *.mbx > empty.bat

Edit the contents of "empty.bat" file so that each line looks like

copy empty.txt first.mbx
copy empty.txt second.mbx
...
copy empty.txt last.mbx

where "first, second ... last" are each of the enumerated mbx files.

You will have to use a text editor which allows you to replace on the
newline character at the end of each line. I recommend

"http://www.notetab.com/

For the NoteTab editor the newline character is represented as '^P'
where the caret is the literal character on the keyboard (not the CTRL
key).

Use the newline '^P' character to insert insert "^Pcopy empty.txt "
(note the ^P at the beginning and the space at the end). This will add
'copy empty.txt ' in front of the mbx filename and put the newline at
the end of the line. You will have to edit the first entry manuallly.

Now you should have a batch file you can run to clear each one of the
mbx files. Run it from DOS in the Eudora directory.

When you open Eudora it will adjust the toc files to the new empty mbx
files.

Once you are satisfied with the results, get rid of the "test"
directory and the "empty.txt" and "empty.bat" files in the Eudora
directory.

This may seem like a lot of work but it is really quite easy if you
understand DOS and the Notetab editor. I was able to do it in under 2
minutes.


--

"Nothing in the world can take the place of perseverance. Talent
will not; nothing is more common than unsuccessful men with talent.
Genius will not; unrewarded genius is almost a proverb. Education
will not; the world is full of educated derelicts. Persistence and
determination alone are omnipotent."
--Calvin Coolidge

Howard Kaikow

unread,
Apr 8, 2007, 11:32:34 AM4/8/07
to
Thanx, Citizen Bob, I forgot that I would need empty mbx files to maintain
the structure.

Easiest is for me to write a program that traverses the and empties each
mbx.

I'll make te program available for others to use.
Likely will not get to this until after 17 April 2007.


Citizen Bob

unread,
Apr 8, 2007, 3:26:18 PM4/8/07
to

Try this very Q&D program:

#include <stdio.h>
#include <dos.h>
FILE *fp;
struct _find_t filefind;
void main(void){
_dos_findfirst("*.mbx",_A_NORMAL,&filefind);
fp=fopen(filefind.name,"w");
fclose(fp);
while(!_dos_findnext(&filefind)){
fp=fopen(filefind.name,"w");
fclose(fp);
}
}

It will compile with the Microsoft Optimizing C Compiler.

If you want the compiled version (about 5.5 KB) let me know your email
address (assuming the one above is munged).

Just make sure you backup your mbx files before emptying them on the
Eudora directory.

John H Meyers

unread,
Apr 8, 2007, 11:24:56 PM4/8/07
to
On Sun, 08 Apr 2007 08:00:48 -0500, Howard Kaikow wrote:

> I've got a few hundred Eudora mailboxes.
> I'd like to maintain the same mailboxes, but delete ALL messages.

> Is the following best?
> [while Eudora is not running]
> Delete all *.mbx files.


> Start Eudora to rebuild the indexes.

No, copy "nul" (empty file) to each .mbx file,
and delete the .toc files,
then start Eudora to create the .toc files again.

A simple command file could do it, e.g.

del xxxx.toc
copy /y nul xxxx.mbx
[repeat for every mailbox name]

To "wipe" *every* mailbox in a given directory
(including "In" "Out" etc. if present),
this command file (stored in that directory
as wipe.cmd or wipe.bat) will do it:

@ echo off
break on
echo.
echo Are you sure you want to WIPE EVERY MAILBOX in this folder?
echo (close this window immediately if you don't!)
echo.
pause
rem and now "just do it"
for %%f in ( *.toc ) do del %%f
for %%f in ( *.mbx ) do copy /y nul %%f

If you want to "wipe" mailboxes in an entire tree (including subfolders),
just add option "/R" after each "for" command (with "command extensions"
enabled in Windows 2000 and later).

This will also delete a couple of unrelated *.toc (like nndbase.toc),
but Eudora should also rebuild those anyway.

If you want to preserve just a few mailboxes, you could
move each of those .mbx and corresponding .toc files elsewhere,
do the global "wipe," then restore the saved MBX/TOC pairs.

Note that mailbox window properties are stored in TOC files,
so all wiped mailboxes will revert to default size and column widths.

To purge all messages in individual mailboxes without such measures,
just display a mailbox window, type Ctrl+A (select all) then hit Delete.

-[ ]-

Citizen Bob

unread,
Apr 9, 2007, 4:40:55 AM4/9/07
to
On Sun, 08 Apr 2007 22:24:56 -0500, "John H Meyers"
<jhme...@nomail.invalid> wrote:

>No, copy "nul" (empty file) to each .mbx file,

That'll work. But most people do not know what "nul" is. So it is
pedagogically better to have them actually create an empty file.

[Whether it's true or not, I took the OP as a non-initiate because he
asks what amounts to a simple question to answer.]

>and delete the .toc files,

Not necessary, as I understand it.

>then start Eudora to create the .toc files again.

If you copy an empty file to each mbx but leave the toc files alone,
Eudora will rebuild the toc files to conform to the empty mbx files.

>A simple command file could do it, e.g.

> del xxxx.toc
> copy /y nul xxxx.mbx
> [repeat for every mailbox name]

Remember that the OP mentioned having "hundreds" of mailboxes, so you
do not want to have to enter all those filenames xxxx manually.

>for %%f in ( *.toc ) do del %%f
>for %%f in ( *.mbx ) do copy /y nul %%f

That should work too but I have had variable results with it over the
years - and I did get the syntax correct too.

Again, that kind of maneuver is not pedagogically appropriate for the
non-initiate.

>Note that mailbox window properties are stored in TOC files,
>so all wiped mailboxes will revert to default size and column widths.

And for that reason alone I would not recommend wiping the toc files.

>To purge all messages in individual mailboxes without such measures,
>just display a mailbox window, type Ctrl+A (select all) then hit Delete.

That is precisely what the OP was trying to get out of having to do
because he has hundreds of mailboxes.

Howard Kaikow

unread,
Apr 9, 2007, 8:10:42 AM4/9/07
to
"Citizen Bob" <sp...@uce.gov> wrote in message
news:46193fb1...@news-server.houston.rr.com...

I am going thru the Eudora API.
In this way, I can more easily, and accurately, find all mailboxes, and the
TOCs would automatically be changed.


John H Meyers

unread,
Apr 9, 2007, 9:19:48 AM4/9/07
to
On Mon, 09 Apr 2007 03:40:55 -0500, Citizen Bob wrote:

> most people do not know what "nul" is. So it is
> pedagogically better to have them actually create an empty file.

How shall they create each of those
(before or after deleting the original?),

Wasn't it also *shown* how to use "nul" in the command examples?

copy /y nul xxxx.mbx
makes the target file empty in one easy step,
and is a snap to accomplish for *all* mailboxes
in one single line using "for" (as was shown)

> If you copy an empty file to each mbx but leave the toc files alone,
> Eudora will rebuild the toc files to conform to the empty mbx files.

When did you find Eudora automatically rebuilding for you,
without asking about each TOC being "corrupt,"
and making you choose whether to rebuild it?
(to which you must say "Yes" each time -- hundreds of times)

That's what I observed to happen in my actual test;
how did you get around that?

> that kind of maneuver [a simple command file which can be copied
> and pasted into Notepad, using two only lines to do the work,
> preceded by a safety measure to head off catastrophic accidents]


> is not pedagogically appropriate for the non-initiate.

Of course; it's better to use a program written in C
(with which everyone is much more familiar),
and compile it with the Microsoft Optimizing C Compiler
(which everyone has, and knows how to use :)

>> Note that mailbox window properties are stored in TOC files,
>> so all wiped mailboxes will revert to default size and column widths.
>
> And for that reason alone I would not recommend wiping the toc files.

The price of not wiping them is to get a "do you want me to rebuild"
interaction for each one (unless you can automate that),
to which you must be sure to always reply "Yes"

However, I have a solution for that, too:

o Start Eudora and choose any *one* mailbox
whose layout you want to be the default.

o Empty the chosen mailbox using Ctrl+A, Delete;
then close it (which will automatically compact it, too).

o Close Eudora.

o Copy the .mbx and .toc of that emptied mailbox
to files "Empty.mb" and "Empty.to" [drop the final letters];
you can simply select each one in Windows Explorer
and Ctrl+C,Ctrl+V [copy,paste]
then rename the "Copy of [each original]"

o Now run a script as before (create the script in the mail folder),
but using these lines instead:

for %%f in ( *.mbx ) do copy /y Empty.mb %%f
for %%f in ( *.toc ) do copy /y Empty.to %%f

Same results as deleting the TOCs, except now having
the desired user-chosen default layout for all mailboxes.

Caution:
Now you should delete all "nndbase.toc" before reopening Eudora,
since we just copied a *mailbox* TOC to each, instead of deleting each.


>> To purge all messages in individual mailboxes without such measures,
>> just display a mailbox window, type Ctrl+A (select all) then hit Delete.
>
> That is precisely what the OP was trying to get out of having to do
> because he has hundreds of mailboxes.

o Other people are reading this, and might like to know
an easier (and normal) way to empty mailboxes.

o The OP never asserted that he did know this; for all we know,
it could take less total time than the program
he was going to write (perhaps after doing his taxes :)
and if it's a one-time-only thing, perhaps worth "just doing" instead.

-[ ]-

Howard Kaikow

unread,
Apr 9, 2007, 9:56:25 AM4/9/07
to
It's easiest, and best to do this task using the Eudora API.


John H Meyers

unread,
Apr 9, 2007, 10:13:44 AM4/9/07
to
On Mon, 09 Apr 2007 08:56:25 -0500, Howard Kaikow wrote:

> It's easiest, and best to do this task using the Eudora API.

Okay; any API easier than two Windows command lines
is a software masterpiece indeed :)

-[ ]-

Howard Kaikow

unread,
Apr 9, 2007, 10:33:16 AM4/9/07
to
"John H Meyers" <jhme...@nomail.invalid> wrote in message
news:op.tqisg...@w2kjhm.ia.mum.edu...

The task cannot be easily, if at all, be done using command lines.
You will see this when the program is available.


Citizen Bob

unread,
Apr 9, 2007, 11:25:54 AM4/9/07
to
On Mon, 09 Apr 2007 08:19:48 -0500, "John H Meyers"
<jhme...@nomail.invalid> wrote:

>When did you find Eudora automatically rebuilding for you,
>without asking about each TOC being "corrupt,"
>and making you choose whether to rebuild it?
>(to which you must say "Yes" each time -- hundreds of times)

I did an example with 5 emtiied mbx files and Eudora 7.1 fixed the toc
files to reflect that they are empty - no prompts or other interaction
on my part.

>That's what I observed to happen in my actual test;
>how did you get around that?

I am running 7.1 - the latest and greatest Pay version.

>> that kind of maneuver [a simple command file which can be copied
>> and pasted into Notepad, using two only lines to do the work,
>> preceded by a safety measure to head off catastrophic accidents]
>> is not pedagogically appropriate for the non-initiate.

>Of course; it's better to use a program written in C
>(with which everyone is much more familiar),
>and compile it with the Microsoft Optimizing C Compiler
>(which everyone has, and knows how to use :)

I did that after the OP stated that he can program.

>The price of not wiping them is to get a "do you want me to rebuild"
>interaction for each one (unless you can automate that),
>to which you must be sure to always reply "Yes"

I did not have to do that. Eudora 7.1 paid version automatically
corrected the tocs without prompting me.

>However, I have a solution for that, too:

>> That is precisely what the OP was trying to get out of having to do


>> because he has hundreds of mailboxes.

>o Other people are reading this, and might like to know
> an easier (and normal) way to empty mailboxes.

The OP can request the compiled version of my C program.

>o The OP never asserted that he did know this; for all we know,
> it could take less total time than the program

Each method takes about the same time to implement.

Citizen Bob

unread,
Apr 9, 2007, 11:25:55 AM4/9/07
to
On Mon, 9 Apr 2007 09:56:25 -0400, "Howard Kaikow"
<kai...@standards.com> wrote:

>It's easiest, and best to do this task using the Eudora API.

I have not used the Eudora API.

Do you have an example of how to use it for this empty mailbox task.

Citizen Bob

unread,
Apr 9, 2007, 11:32:24 AM4/9/07
to
On Mon, 9 Apr 2007 10:33:16 -0400, "Howard Kaikow"
<kai...@standards.com> wrote:

>> > It's easiest, and best to do this task using the Eudora API.

>> Okay; any API easier than two Windows command lines
>> is a software masterpiece indeed :)

>The task cannot be easily, if at all, be done using command lines.
>You will see this when the program is available.

Thus far John Meyers has come up with the easiest method, if you can
get it to work reliably.

Just be sure to do it in a test directory, so that you won't wreck
your Eudora installation if that the DOS "batch" processor brainfarts
all over the place.

DOS batch commands are not anywhere near as robust as C Shell or
Bourne Shell commands in UNIX, especially when you are attempting
loops and filename expansion.

Howard Kaikow

unread,
Apr 9, 2007, 5:59:05 PM4/9/07
to
"Citizen Bob" <sp...@uce.gov> wrote in message
news:461a4e45....@news-server.houston.rr.com...

> I have not used the Eudora API.
>
> Do you have an example of how to use it for this empty mailbox task.

I downloaded the Eudora SDK back in 2003, or thereabouts.
Not well documented.
No Help foound in Obhect browser, just the API statements, no explanation.

There is at least one example that shows how to traverse the tree.

Appears that removed messages are sent to Trash, so I had to insert code to
EmptyTrash.
Apparently, some messages can give a problem if the TOC is not clean, so
extra error handling has to be included.

I'm running a test as we speak.

I copied the Eudor mailbox directory to a USB drive, so I can restore for
further testing.
But, I gotta do taxes, so may jave nothing more to say until after 17 April
2007.


Howard Kaikow

unread,
Apr 9, 2007, 6:02:43 PM4/9/07
to
The program has at least the advantages of:

1. assuring that the tree is traversed, even when the tree changes from
time to time.;
2. TOC gets automatically updated.
3. Errors are automatically trapped, and, perhaps, may be overcome with
programming trickery.


Howard Kaikow

unread,
Apr 9, 2007, 6:45:00 PM4/9/07
to
Ouch!

I did not realize the status of Eudora.

Qualcom is no longer making te API info available at their web site.

Sew, I am downloading th elatest version, perhaps it has an
improved/enhanced API??


John H Meyers

unread,
Apr 10, 2007, 4:41:51 PM4/10/07
to
On Mon, 09 Apr 2007 09:33:16 -0500, Howard Kaikow wrote:

> The task cannot be easily, if at all, be done using command lines.

Well, I've already done it and tested it before posting, as usual,
using exactly what was posted.

There are programs which make it difficult to do anything
except through the programs themselves, but Eudora,
to its credit, is designed so well, yet simply,
that many useful things can be accomplished offline,
including this.

-[ ]-

John H Meyers

unread,
Apr 10, 2007, 4:55:53 PM4/10/07
to
On Mon, 09 Apr 2007 10:25:54 -0500, Citizen Bob wrote:

> I did an example with 5 emptied mbx files and Eudora 7.1 fixed the toc


> files to reflect that they are empty - no prompts or other interaction
> on my part.

If the "last modified" date/time of the mailbox is later than
the corresponding timestamp on the TOC (within a small leeway,
about ten seconds by default), this normally triggers the
"corrupted TOC" dialog, as it did in any test I made
copying "nul" to a MBX without removing the corresponding TOC;
the discovery of each "corrupted TOC" does not occur
immediately upon opening Eudora, however -- it only occurs
when one tries to open the given mailbox.

Among the ways to guarantee that the end result will be
correct TOCs are (a) to delete the TOCs, forcing automatic
re-building (which is never accompanied by dialog),
and (b) by copying an MBX/TOC pair that is already
a normally emptied mailbox, in which case that MBX/TOC pair
is already "in sync" and has appropriate timestamps,
having last been written by Eudora itself during normal operations.

-[ ]-

John H Meyers

unread,
Apr 10, 2007, 5:35:46 PM4/10/07
to
On Mon, 09 Apr 2007 10:32:24 -0500, Citizen Bob wrote:

> DOS batch commands are not anywhere near as robust as C Shell or
> Bourne Shell commands in UNIX, especially when you are attempting
> loops and filename expansion.

Indeed, anyone who pines for a good Linux system
but is stuck with Windows can get Cygwin,
which makes Windows look like Linux,
and is incredibly powerful (as well as free):

http://www.cygwin.com/
http://en.wikipedia.org/wiki/Cygwin

Quite a few equally powerful stand-alone
Unix-like utilities for Windows
which were originally developed by
Mark Russinovich & Bryce Cogswell
are still available, even though
http://www.sysinternals.com
has since been absorbed by Microsoft,
where the above link re-directs you.

The following remnant still seems to exist
apart from Microsoft, however:
http://www.sysinternals.com/Utilities/NtfsDos.html

The related "wininternals" company (and product)
is also about to dissolve: http://www.winternals.com/

"Get the good stuff while it lasts" [Eudora, too :]

-[ ]-

John H Meyers

unread,
Apr 10, 2007, 5:42:23 PM4/10/07
to
On Mon, 09 Apr 2007 17:45:00 -0500, Howard Kaikow wrote:

> Ouch!

Yep.

> I did not realize the status of Eudora.

> Qualcom is no longer making the API info available at their web site.

Only ftp://ftp.eudora.com remains (for how long?)

-[ ]-

Citizen Bob

unread,
Apr 11, 2007, 8:48:52 AM4/11/07
to
On Tue, 10 Apr 2007 16:35:46 -0500, "John H Meyers"
<jhme...@nomail.invalid> wrote:

>Quite a few equally powerful stand-alone
>Unix-like utilities for Windows
>which were originally developed by
>Mark Russinovich & Bryce Cogswell
>are still available, even though
>http://www.sysinternals.com

Yes, I have some of them, including RegMon.

Another handy utility is RegProtect. It pops a dialog every time
something attempts to install a background task.

http://www.diamondcs.com.au/index.php?page=regprot

0 new messages