RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Feature Request: Rename Attachments using formatting presets when saving #197

Closed JF1313 closed 1 month ago

JF1313 commented 1 year ago

Is there a way to rename a file attachment before saving it?

If not, can this be considered for a future release?

RealRaven2000 commented 1 year ago

no not at the moment, it tries to use something that's close to the original name. The main problem is that the only parameter for this extra filter action is already taken by the folder path of where it will be stored.

Also how would this filter work if it ran again on another attachment? Should it overwrite the existing one? Should it have some rules on what the exact file name was? should it append a counter?

JF1313 commented 1 year ago

Hi there, I've enclosed screenshots from ImportExportToolsNG that handles the saving as files for suggestions of how to handle it. The ability to rename the file before saving it would be great!

Export Directories Misc Filename

smartcooky99 commented 1 year ago

Perhaps automatically rename the attachment to some aspect of the email sender's address, for example the name/text before the "@" in the email address, plus a dash separator .... so an attachment called "IMG1234.jpg" from a sender whose email address is "fred_smith@emailprovider,com" would be renamed and saved as fred_smith-IMG1234.jpg

If this was possible, at least it would be a start.

RealRaven2000 commented 1 year ago

If you look at the many attachment issues quite a few complain about shortening / modifying the name. I recently lifted the restriction to 60 characters for the file name, but I am not sure what kind of side effects / problems this may open up in the future because of OS specific file name restrictions. So the main question is if you had a renaming scheme what exactly would it help you with? It's considerable effort to implement something like this (and making the UI + translating to different languages) - what exactly are you trying to do with the files afterwards?

smartcooky99 commented 1 year ago

Don't get me wrong, having the attachments saved automatically saves a lot of time and effort.

I receive about 50-80 attachments per day. They are almost all either jpeg/png/webp images or pdf/docx files. At the moment I have to manually check all the filenames of the attachments in each email, and match them up with the attachments in the target folder, then rename them. It would be very useful to just have that happen automatically to see the email sender's names reflected before the actual filename.

Also, I don't think you'd have to worry about translating foreign language characters. As I understand email protocols, you cannot use the "@" character in an email name (for obvious reasons), and every language uses it as the name/domain separator, so whatever text is before the "@" could become the first part of the modified filename whatever language its in...

I used to use AttachmentExtractor (then (AttachmentExtractor Continued) but that ceased to function some time ago. It allowed for the renaming of attachments and specifying the types of attachments it would save.

If this really is more difficult to do that I am thinking, no worries. I really do appreciate that I don't have to spend ages right-clicking on every single attachment just to save it.

xstable commented 1 year ago

Would love to have such an feature. In my case I save invoices from suppliers. What I try to archive is to create a Filter for each supplier-sender-address and put a prefix in the filename of the attached files. This way they got a more unique (and speaking) filename.

INV_1325.pdf would be renamed to addidas_1325.pdf.

If attachment already exist, it would be fine to me to see a small dialog with info like

The file addidas_1325.pdf already exist in /home/me/invoices

geoorgge commented 1 year ago

Strongly supporting this. See similar options in https://github.com/thestonehead/ThunderbirdAttachmentExtractor

Both Filtaquilla and Attachment Extractor create duplicate messages, when detaching attachments. https://github.com/RealRaven2000/FiltaQuilla/issues/139

RealRaven2000 commented 8 months ago

Also dealing with the same topic: #219 - not sure which one to close as a duplicate because both have detailed information

RealRaven2000 commented 1 month ago

Let's continue over on #219 and close this one as duplicate.