I have a number of directories where I store emails. I do this simply by dragging and dropping them from my email program. Most of the time, just using the subject as the file name is correct, so I have my template set to <subject>.
But for certain directories, we have a different "standard" and I need to prepend the date. So in those directories, I use <date>_<subject>. I do this by manually changing the configuration, but this is obviously a bit of a nuisance.
It would be useful for me to have per-folder template settings (or some similar alternative, for example an "alternate" setting which is used when I drop a message whilke holding down the Windows key).
Hmm, alternatively, is it possible to get at email values like <subject> and <date> within a script? Then I could build my own script to rename the files after I drop them... That might be a more generally useful feature to add, if it's not already there.
Paul.
Per-directory templates/dropped messages settings
-
admin
- Site Admin
- Posts: 64886
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Per-directory templates/dropped messages settings
I see your point, but I can't do much about it for now.
Maybe the best way to go would be to create a rename job (UDC / Rename RegExp...) that converts your filenames to the wished standard after dropping.
Maybe the best way to go would be to create a rename job (UDC / Rename RegExp...) that converts your filenames to the wished standard after dropping.
FAQ | XY News RSS | XY X
Re: Per-directory templates/dropped messages settings
That's certainly possible (and may actually be better than something as specialized as per-directory templates) but I'd need to be able to get the email properties for the current item. The only way I can see of doing this at the moment would be to write a VBScript program that extracted the data from the file and put it in the clipboard, and then use a UDC/Scriptadmin wrote:Maybe the best way to go would be to create a rename job (UDC / Rename RegExp...) that converts your filenames to the wished standard after dropping.
Code: Select all
run ExtractEmail.vbs <curitem>; rename , <clipboard>_*Paul.
-
admin
- Site Admin
- Posts: 64886
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Per-directory templates/dropped messages settings
When your template generates <subject>_<date> files and you need <date>_<subject> files, then you'd simply need a RegExp rename that swaps the parts of the name. No need to grab the data again from the contents.
FAQ | XY News RSS | XY X
Re: Per-directory templates/dropped messages settings
Ah, I see what you're getting at. My problem's slightly worse - for the default, I use a template of <subject> only, so I don't have the date available for those cases when I need it. And <subject> is far more common, so I can't really make <date>_<subject> the default and have a UDC to strip the date where I don't need it.admin wrote:When your template generates <subject>_<date> files and you need <date>_<subject> files, then you'd simply need a RegExp rename that swaps the parts of the name. No need to grab the data again from the contents.
Oh, well, I'll see what I can do with VBScript and the joys of the CDO object model
Paul.
-
admin
- Site Admin
- Posts: 64886
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Per-directory templates/dropped messages settings
Note that the date is also found in the Modified Date of a dropped message. You can retrieve it for the current file using <datem ...> or using SC report(). Some scripting skills are needed here.pmoore wrote:Ah, I see what you're getting at. My problem's slightly worse - for the default, I use a template of <subject> only, so I don't have the date available for those cases when I need it. And <subject> is far more common, so I can't really make <date>_<subject> the default and have a UDC to strip the date where I don't need it.admin wrote:When your template generates <subject>_<date> files and you need <date>_<subject> files, then you'd simply need a RegExp rename that swaps the parts of the name. No need to grab the data again from the contents.
Oh, well, I'll see what I can do with VBScript and the joys of the CDO object model![]()
Paul.
FAQ | XY News RSS | XY X
Re: Per-directory templates/dropped messages settings
Ah! I hadn't noticed that. That will suit me fine! Thanks for saving me from VBScriptadmin wrote:Note that the date is also found in the Modified Date of a dropped message. You can retrieve it for the current file using <datem ...> or using SC report(). Some scripting skills are needed here.
Paul
XYplorer Beta Club