A rule in app. mail

hello everyone!

Everyday i receive some mail with attachments that i would like to put on a folder for other people to use.
My question is what’s the script code to put on a mail rule in order to copy the attachments to a folder with the name of the subject message.
Example: A client sends me a mail with some jpg’s attached, and the subject of the message is 12345.456789. I want to save the jpg’s files in a folder at a specific place and inside that folder i want to save the .jpg files in another folder called 12345.456789.

Can anyone help me with this.
Greatings from Portugal.

Greetings from Tacoma:

I started a thread about a year ago that covers nearly the same issue. The link is here, and although it is lengthy, it is probably the best place to start, and in fact, may very well solve your problem quickly.