problem with bad filenames with mu extract
Expected or desired behavior
All attachment extracted
Actual behavior
Only first attachment is extracted or only last attachment is extracted
Steps to reproduce
My contractor sends me two or more invoices by mail in pdf file format. The filename of attachment is the number of invoice. Unfortunately, the invoice number contains the '/' mark which is a problem:
Mu extractor ignores everything before last '/' assuming that this is a folder part of filename. Unfortunately - in my case the last part of invoice is identical: FU/1234/ABC/05.2016.pdf NA/345/BRE/05.2016.pdf
the result is that first attachment is saved as 05.2016.pdf and second raises error file exists. If I use --overwrite error isn't raised, but of course got only last invoice (which is correct behaviour of -overwrite).
I can get attachments one by one using -part= but this is complicated.
my proposal is to handle exception file exists and rename next occurence with .1, .2, .3, etc. as a default behaviour
alternatively you can add parameter --add_attachment_number_to_filename: which in my case produces this result:
2_05.2016.pdf 3_05.2016.pdf
I think adding some numeric suffix is the more general solution here.
This is really old, but if this is still a problem, can you attach an example message where this happens? We might use this for a unit test etc.
This has gone stale, closing this.