Aid4Mail 5 Command-line interface (Enterprise License)

The Aid4Mail 5 Enterprise license includes a command-line interface (CLI) that enables further automation. It allows the software to be run from the Windows Command Prompt, batch files or directly from third-party applications. Aid4Mail Investigator and Converter do not have access to the command-line interface.

Aid4Mail CLI executables

Aid4Mail contains two CLI executables. One is 32-bit and the other 64-bit:

  • a4m-32.exe
  • a4m-64.exe

In general, 32-bit software is faster than 64-bit software. If processing speed is your priority, use the 32-bit executable. However, 64-bit software can potentially access four billion times more physical memory than 32-bit applications! If your system has more than 4 GB of RAM, and you need to process emails that are large (usually due to large attachments), Aid4Mail may perform more efficiently if you use the 64-bit executable.

If your source or target mail format is an Outlook profile, or PST/MSG file(s) that you want to access through Outlook, and you Have 64-bit Outlook installed on your system, then you will need to use the 64-bit Aid4Mail executable.

Constructing a command line

To run Aid4Mail from the command line, specify an executable followed by either the Settings switch or the CLI switch. Additional switches can be used to specify individual settings (that override their counterparts in the settings file).

Settings switch

The -settings switch specifies the location of the session settings file to be used.

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”

Any optional switches used to specify individual settings will override the corresponding settings in the settings file. This can prove useful in certain scenarios.

CLI switch

The -cli switch tells Aid4Mail not to use a settings file and, instead, use internal default values. The intention is that all settings will be individually specified. This means that, at a minimum, you must specify the source and target format, and the location of the source and target files or accounts.

Specifying individual settings

Any setting that can be used in the session settings file has a corresponding, optional command-line switch that takes precedence. In other words, a setting specified in the command line overrides the corresponding setting in the session settings file if both are present.

The command-line switch for an individual setting is composed of a hyphen (-), followed by the heading under which the setting would appear in the settings file, a period, and finally the setting name:

-Heading.SettingName

For example, in the session settings file, the source format is located under the Source heading and the setting is called Format. The command-line switch for this setting is:

-Source.Format

Likewise, the command-line switch for the RootLocation setting, under the Source heading, is:

-Source.RootLocation

These command-line switches require a value (as do their corresponding settings in the file). Specify the value after a colon following the switch as follows:

-Source.Format:EML
-Source.RootLocation:D:\Email\Source\EML\

The full command line, using the JohnDoe session settings file, and overriding the source format and root location, would look like this:

a4m-32.exe -settings:C:\Users\FookesSoftware\Projects\ArchiveEmployeeMail\JohnDoe.settings.ini -Source.Format:EML -Source.RootLocation:D:\Email\Source\EML\

As before, make sure that any values containing spaces are placed in quotes.

When should you override a session settings file?

The ability to specify individual settings is particularly useful in multi-session scenarios, where sessions mostly share the same settings but have a small number that are different. An example of this type of scenario would be a large-scale archival project where 1,000 employee accounts, currently in the EML format, need to be archived in separate PST files.

In this example, most settings would be identical for each Aid4Mail session with only the source and target file locations changing from one session to another. To accomplish this, common settings scan be stored in a shared settings file and the source and target file locations can be specified directly for each session. The command line (for the first three sessions) would look something like this:

a4m-32.exe -settings:Common.settings.ini -Source.RootLocation:Leroy\ -Target.FileStore:Leroy.pst
a4m-32.exe -settings:Common.settings.ini -Source.RootLocation:Ava\ -Target.FileStore:Ava.pst
a4m-32.exe -settings:Common.settings.ini -Source.RootLocation:Jane\ -Target.FileStore:Jane.pst
etc…

Common command-line switches

Note that command-line switches and their values are case-insensitive.

Command-line switch
Description
-Settings

Location of the session settings file to be used. Settings in this file can be overridden by specifying individual settings.

Note that every command-line must contain either the -Settings switch or the -CLI switch.

-CLI

Indicates that there is no session settings file and internal defaults will be used, overridden by specifying individual settings.

Note that every command-line must contain either the -Settings switch or the -CLI switch.

-Source.Format
Same as the Format field in the Source settings.
-Target.Format
Same as the Format field in the Target settings.
-Source.RootLocation
Same as the Location field in the Source settings.
-Target.RootLocation
Same as the Location field in the Target settings.
-Source.FileStore
Same as the PstFile field in the Source settings.
-Target.FileStore
Same as the PstFile field in the Target settings.
-Source.MapiProfile
Same as the Profile field in the Source settings.
-Target.MapiProfile
Same as the Profile field in the Target settings.
-Source.MapiStore
Same as the Store field in the Source settings.
-Target.MapiStore
Same as the Store field in the Target settings.
-Source.AuthTokenFile
File location of the authentication token that provides access to the account whose Email address is in the Source settings.
-Target.AuthTokenFile
File location of the authentication token that provides access to the account whose Email address is in the Target settings.
-Source.ImapConfig
Location of the IMAP configuration file that represents the IMAP account in the Source settings.
-Target.ImapConfig
Location of the IMAP configuration file that represents the IMAP account in the Target settings.

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