When using the Mail Receive configurator, a random email will come through with a trailing space in the subject, which results in a folder being created (using Switch on Windows) on a Windows server with a space at the end, which is a problem - it can only be deleted from the command prompt. So you end up with this folder that you (practically) can't delete.
Any tricks to not allow this to happen or to strip the space off the end before creating the directory?
Trailing Space When Using Mail Receive
Re: Trailing Space When Using Mail Receive
Hey man,
That's what switch-variable-scrubber was designed to do. I haven't used the mail receive before, but if you can get the subject as a variable and then scrub it before making the folder with it, it should give you the desired result.
Otherwise, you can probably apply some sort of regex with a variable expression to specifically look for and remove trailing spaces on that variable.
That's what switch-variable-scrubber was designed to do. I haven't used the mail receive before, but if you can get the subject as a variable and then scrub it before making the folder with it, it should give you the desired result.
Otherwise, you can probably apply some sort of regex with a variable expression to specifically look for and remove trailing spaces on that variable.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Re: Trailing Space When Using Mail Receive
When using a variable that is a string you can always trim or norm it. Trimming means: remove leading and trailing spaces, norming means trimming and replacing multiple spaces by one space.
If you are collecting the mail files into a job folder, rename that job by replacing the name of the job by [Job.Name:Space="norm"]. If you are using the mail subject in "Set hierarchy path" then you simply set the path to [Job.Name:Space="norm"].
If you are collecting the mail files into a job folder, rename that job by replacing the name of the job by [Job.Name:Space="norm"]. If you are using the mail subject in "Set hierarchy path" then you simply set the path to [Job.Name:Space="norm"].
Re: Trailing Space When Using Mail Receive
I'm first trying your suggestion Freddy thanks, that's the kind of solution I was envisioning.