DBXcmd Command-Line Utility
DBXanalyzer now ships with a separate utility DBXcmdTM that can be called via the command line (i.e. in MS-DOS mode).
You can use DBXcmd to create a list of messages in a variety of formats, including CSV, or export the messages in EML (TXT) format to a target directory. You can call the utility from a batch file or have the Windows Scheduler run the batch file every night, for example, to backup certain messages from your DBX files.
To see the syntax and the complete list of options type
dbxcmd -? | more
Usage: DBXCMD [[-l]|-e|-?] [options] dbxfile [outpath] where: -l List messages (default action) to file <outpath> (default=console) -e Export message files to directory <outpath> (default=CWD) -? Display this help and quit
dbxcmd -l "C:\EmailData\inbox.dbx"inbox.dbx in the folder C:\EmailData
on the console with a complete set of tab-delimited fields. Note the option is a lower-case letter L for List.
dbxcmd "C:\EmailData\inbox.dbx"dbxcmd -e "C:\EmailData\inbox.dbx"Re_ The Subject Line" i.e. the subject
line with any illegal filename characters replaced by "_", possibly with "{1}"
appended if the same name already exists in the current set.
(Hint: Add the -g option to guarantee not to overwrite an existing file of the same name.)
dbxcmd -e "C:\EmailData\inbox.dbx" "C:\mybackup\emails"C:\mybackup\emails.
dbxcmd -e -y "C:\EmailData\inbox.dbx" "C:\mybackup\emails"dbxcmd -e -g "C:\EmailData\inbox.dbx" "C:\mybackup\emails"C:\mybackup\emails.
dbxcmd -e -pw "C:\EmailData\inbox.dbx" "C:\mybackup\emails"20041231235959_ReTheSubjectLine,
i.e. with a prepended date-time of receipt and all white space and punctuation characters in the
subject line removed.
dbxcmd -e -j "C:\EmailData\inbox.dbx" "C:\mybackup\emails"20041231235959,
i.e. with just the date-time of receipt.
dbxcmd -e -a2004-12-31 "C:\EmailData\inbox.dbx" "C:\mybackup\emails"dbxcmd -e -b2005-01-15 "C:\EmailData\inbox.dbx" "C:\mybackup\emails"dbxcmd -e -a2004-12-31 -b2005-01-15 "C:\EmailData\inbox.dbx" "C:\mybackup\emails"dbxcmd -e -a#10 "C:\EmailData\inbox.dbx" "C:\mybackup\emails"dbxcmd -e -a#0 "C:\EmailData\inbox.dbx" "C:\mybackup\emails"dbxcmd -e -xTXT "C:\EmailData\inbox.dbx" "C:\mybackup\emails"dbxcmd -l "C:\EmailData\inbox.dbx" "C:\mylists\inbox_list.txt"C:\mylists\inbox_list.txt in tab-delimited format.
dbxcmd -l -c "C:\EmailData\inbox.dbx" "C:\mylists\inbox_list.csv"C:\mylists\inbox_list.csv in CSV format
- this format can be read directly by Microsoft Excel.
dbxcmd -l -ch "C:\EmailData\inbox.dbx" "C:\mylists\inbox_list.csv"dbxcmd -l -ch -a#0 "C:\EmailData\inbox.dbx" "C:\mylists\inbox_list.csv"dbxcmd -l "-s|" "C:\EmailData\inbox.dbx" "C:\mylists\inbox_list.txt"dbxcmd -l -ufedm "C:\EmailData\inbox.dbx" "C:\mylists\inbox_list.txt"
Create a batch file called, say, dbxbackup.bat with this one line in it:-
FOR %%f IN ("C:\Email Data\*.dbx") DO dbxcmd -e -g -pw -a#0 "%%f" "C:\mybackup\emails"
This batch file will create a backup of all messages received today
in all DBX files in the directory C:\Email Data
as unique EML files in the directory C:\mybackup\emails.
Note the use of the double "%%" in batch files for variables.
You could use Windows Scheduler to run this batch file
at, say, 11:55 p.m. each day.
-e Export messages
-g with Guaranteed unique filenames in output directory
-pw with date-time received Prepended to output filename
and all Whitespace and punctuation characters stripped from the subject line
-a#0 received on or After zero days ago, i.e. today in system local time
This is DBXCMD Licensed Version 1.1.2 (Feb 25 2008) Copyright (C) 2005-8 DI Management Services Pty Ltd <www.di-mgt.com.au> Usage: DBXCMD [[-l]|-e|-?] [options] dbxfile [outpath] where: -l List messages (default action) to file <outpath> (default=console) -e Export message files to directory <outpath> (default=CWD) -? Display this help and quit GENERAL options: -y suppress prompting before overwriting a file -d Dumb mode ie no output except errors -- subsequent parameters are not options FILTER options on messages to be listed/exported: -a<date> on or After date yyyy-mm-dd, eg -a2004-12-31 -b<date> on or Before date -o<date> On the specified date -a#<n> on or After <n> days ago, eg -a#10 -b#<n> on or Before <n> days ago -o#<n> On the day <n> days ago EXPORT options: -x<ext> use <ext> as file eXtension (default=EML) eg -xTXT -m Make new directory without prompting -g Guarantee a unique filename in output directory -p Prepend date-time received to output filename -j Just use date-time with no subject for output filename -w remove Whitespace and other punctuation characters from filename LIST options: -h include Header as first line (default=no header) -c output in CSV format (default=tab delimited) -s<char> use <char> as field Separator (default tab) eg -s; -q Quote strings with quotation marks (default no quote) -u<colcodes> list colUmns as per column codes (see below) -u* = list all columns in default order (default) COLUMN CODES in default order: i Index number f From name s Subject a Attachments Y/N d Date received k size in KB p Priority r to Recipient t sent To v account serVer m MessageID o Output filename z filesiZe in bytes e sender Email address c reCipient email address eg -uefs lists columns (senderEmail,From,Subject) Notes: 1. Specify dates in ISO format yyyy-mm-dd 2. Quote parameters with `special' chars eg "-s|" and with spaces eg "C:\My Documents" For more info see <http://www.di-mgt.com.au/dbxanalyzer/dbxcmd.html>
dbxcmd -l instead of dbxcmd -L).
dbxcmd -epwis valid and is the same as
dbxcmd -e -p -wbut
dbxcmd -epwa2004-12-31is illegal.
Any comments, feedback, questions to our email or use our Contact Page.
This page last updated: 11 October 2008