How to save outlook attachments automatically from command-line

OutlookAttachView is a freeware tool that allows you to scan attahcments of Microsoft Outlook and then save them to a file, from the GUI and from command-line.
In order to save your Outlook attachments from command-line automatically, run OutlookAttachView and choose the desired attachment scanning options. OutlookAttachView provides many scanning options, like scan only messages in the last xx days, scan only unread messages, scan only messages that their subject contain the specified string, and so on...

After choosing the desired options, click the 'Ok' button and OutlookAttachView will scan your Outlook mailbox, and the found attachments will be displayed on the main window. Assuming that the scan result of OutlookAttachView is ok, you can now close OutlookAttachView and the scanning options will be saved into OutlookAttachView.cfg

Outlook Attchment Scan Options

Now you can run the attachments scanning from command line and automatically save all attachments into the desired folder.

For example, in order to extract all Outlook attachments found in the scan into c:\OutlookAttachments folder, run the following command:
OutlookAttachView.exe /CopyFilesFolder "C:\OutlookAttachments" /extractall

If you want to set the modified time of the file to the time of the message, add /UpdateModifiedTimeMessage 1
OutlookAttachView.exe /CopyFilesFolder "C:\OutlookAttachments" /UpdateModifiedTimeMessage 1 /extractall

There is also an option to to set the filename format of the saved attachment, for example... if you want to include the subject of the messaage in the saved filename:
OutlookAttachView.exe /CopyFilesFolder "C:\OutlookAttachments" /UpdateModifiedTimeMessage 1 /FilenameFormat "%subject%_%attach_name%.%extension%" /extractall

You can also set the read flag of the message after extracting the attachment, using the /extractallsetreadflag command:
OutlookAttachView.exe /CopyFilesFolder "C:\OutlookAttachments" /extractallsetreadflag

There are also other options and features for scanning the Outlook attachments and save them into files. You can find more information about them in OutlookAttachView Web page.