You could use the
FiltaQuilla addon to add filter actions such as
Save Attachments To,
Detach Attachments To and
Run File.
Then set a Message Filter to:
1) Match Subject/Body/etc
2) Save Attachment To <some dir>
3) Run File rename.cmd,attachment.txt
All you need to do then is knock up a command file to do the rename or a simple AHK or AutoIT script.
Here's a AutoIT script that'll take a single argument and change the filename to YYYYMMDDhhmmss.txt
eg. RenFile.exe U:\temp\attachment.txt
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; RenFile.exe <filename> [new filename, no path, no extension]
; eg.
; RenFile.exe file1.txt <- new file called 20120215143523.txt
; RenFile.exe file1.tmp file2 <- new file called file2.tmp
$path = ''
$ext = ''
MsgBox(48, 'RenFile', 'Failed to rename: ' & $CmdLine[1])
Source and compiled executable attached.
You should be able to set a Message Filter similar to:
So the theory goes
UPDATE: RenFile.exe will take an optional extra argument which will be the filename to rename the file to, (filename only sans extension, no path input). No second argument will default it to YYYYMMDDhhmmss.<ext>
It retains the extension of the file passed in the first argument, so no need to add an extension to the optional second argument.
So you could change the
Run File action in the message filter to, (using example above):
Run File:
RenFile.exe,U:\temp\attachment.txt,@DATE@This should rename the saved attachment to match the date string of the message.