Organize your attachments in a folder structure!
How to organize your attachments in a folder structure like shown above?
In this little tutorial I will show how you can tell EEAttachments to organize your attachments into a folder structure where folder-name is like C:\folder\fromaddress\file.
Example:
- C:\temp\EEAttachments\
- D.Trump@whatsapp.cc
- attachment1
- attachment2
- attachment3
- Katy@per.ry
- attachment1
- Paris@hil.ton
- attachment1
- attachment2
- Robby@Willia.ms
- SpongeBob@schwammko.pf
- attachment1
- D.Trump@whatsapp.cc
As you see above, I start a batch file ( process.bat ), which will do the categorization by from address.
I use %from% as from address and %file% in order to touch the exported file with my batch job. Also I use the "> C:\temp\process.log" argument to have the possibility to find errors.
In the batch file I can now use the parameters %0 %1 %2. I use %1 as the from-address and %2 which is the file EEAttachments has saved into it's directory.
This is how the batch file looks like:
mkdir C:\temp\EEAttachments\%1
move %2 C:\temp\EEAttachments\%1\
With mkdir I create a subfolder every time a file is exported. The name of the subfolder is the from-address of the mail. I the folder is already existing, nothing is happening. At least the move line will move the exported file into the just created subfolder.