How to use a session settings file in the command line interface

With the Aid4Mail console version (only available with Aid4Mail 5 Enterprise license), the -settings switch specifies the location of the session settings file to be used in the command-line.

For example, the following command line will run the 32-bit Aid4Mail executable using the JohnDoe session settings file:

a4m-32.exe -settings:C:\Users\FookesSoftware\Projects\ArchiveEmployeeMail\JohnDoe.settings.ini

Note that if the file location contains one or more spaces then it needs to be enclosed in quotes, as follows:

a4m-32.exe -settings:”C:\Users\Fookes Software\Projects\Archive Employee Mail\JohnDoe.settings.ini”

The command-line switch names reflect exactly those in the session settings file using a very simple rule. Values specified through the command line will always override matching values in the settings file.

*If you do not want to use a session settings file in your command-line, you would use the -cli switch. The -cli switch tells Aid4Mail not to use a settings file and, instead, use internal default values.

For more information on the -cli switch, see here: Aid4Mail 5 Command-line interface

Here’s an example of the contents of the settings INI file:

[App]
AbortOnBadError=No
BatesCounter=1
CreateBackupOnFailure=Yes
EmailHashValue=MessageId
SessionUID=dbd8faaf

[Source]
Format=EML
RootLocation=D:\Email\Source\Test\EML\

[Filter]
Duplicates=FlagAll
IncludeEmptyFolders=No
IncrementalProcessing=No
ItemSearch=ItemScript
MapiProcessOnlyEmails=No
MaxSearchSize=32M
MinImageSize=32K
SaveIncrementalData=Yes
SearchAttachments=Yes
SearchFileMetadata=No
SearchInContainers=Yes
SmartCaseDetection=No
ItemScript=
ItemSearchCriteria=
Script=Test
FolderSearch=ProcessAll

[Modify]
AddMetadataToHeader=Yes
TargetFolderPathFormat=MirrorSource
Script=Test

[Target]
AppendMail=No
Format=MapiPst
RootLocation=
LimitPstFileSize=No Limit
FileStore=D:\Email\Target\Test.pst

You can override any of the settings by specifying the section name (eg. Source), followed by a dot and then the key name (eg. RootLocation). Then you add a colon followed by the new value. Each command line switch is preceded by a hyphen.

Here is an example:

-Source.RootLocation:”D:\Email\Source\MSG\”

*We suggest that you first use the Aid4Mail GUI version to create a session with the appropriate settings you need for the Source and Target formats. After creating the session, you can find the sessions settings file in the Project folder. You can then use this session settings file in your command-line.

The Project folder is found here by default: C:\Users\USERNAME\Documents\Aid4Mail\Projects\Project-PROJECTNAME.

Here’s a complete command line that overrides the source location and target PST file name:

a4m-32.exe -settings:"C:\Users\User\Projects\Demo\Test.settings.ini" -Source.RootLocation:"D:\Email\Source\MSG\" -Target.FileStore:"D:\Email\Target\Outlook.pst"

If you experience any issues, please don’t hesitate to contact us.

If you would like to buy an Aid4Mail license, please visit the Aid4Mail website.

About Fookes Software

Fookes Software Ltd
La Petite Fin 27
1637 Charmey (en Gruyère)
Switzerland

For over 25 years we have been developing award-winning tools and productivity software. We also have more than 20 years of expertise in the field of email processing and analysis.

Our clients include Fortune 500 companies, government agencies, law firms, universities, and professionals specializing in e-discovery and forensics from around the world.

Your outdated browser! You can download Edge or Chrome or Firefox