MSGExtractor "InputPath" "OutputPath" [-x|-a|-xa] [-c] [-dn "subfolderformat"] [-fn "filenameformat"] [-h] InputPath : Either an existing file (to extract information from a specific .msg file) or an existing folder (to extract information from multiple .msg files in a folder). OutputPath : If the path contains an three letter extension, then it is assumed that this is a file. If the path is not absolute, the output filepath is with reference to the input path. Otherwise, it is assumed that this is an folder path. In that case, the following rules apply: - if outputpath is empty then the output is with reference to the input folder. - When not an absolute path, the outputpath is considered an subfolder of the program folder. - The -DN format will add an subfolder if applicable. - For writing XML data files, the -FN format will determine the filename. - When -FN is not provided, an filename will have the same name as the inputfile. -x : Create a XML data file with the message information (default). -a : Extract all attachment files in the output folder. -xa : Do both... -c : Will clear existing output folders. -h : Will show this help. -dn : The provided subfolderformat will add a specific subfolder. -fn : The provided filenameformat will add a specific filename. The formats for -dn and -fn can be a normal text like "info.xml" or "subfolder" or even "Sub\Subsub". When some keywords are used, the names can be different per outlook message. The following keywords are available: firstto, multito, sentdate, senttime, subject, sender, filename Example: MSGExtractor "C:\Data\Outlook" "C:\Data\Info" -xa -c -dn "sentdate, subject" -fn "info filename.xml" This command will perform the following for each .msg outlook file in the folder 'C:\Data\Outlook': - write an XML info file to ,e.g: 'C:\Data\Info\2019-05-09, Subject of mail\info outlookexample.xml' - write all attachments (if available) to a folder, e.g.: 'C:\Data\Info\2019-05-09, Subject of mail' Return values are: 1 : Single message correctly handled. 2 : Multiple messages correcty handled. 0 : help requested. -1 : No input arguments used. -2001 : Single message file is not correctly loaded. -2002 : Single message file is not correctly exported to xml. -2003 : Single message info file is not correctly written to file. -2004 : Single message file attachments are not correctly exported to folder. -3001 : Multiple messages, one or more errors occured. -9999 : Unexpected Error.