- Tested 2 spaces and 1 space have no difference
- "Attachments" not "Attachment"
If you want to use VBS and a Batch script I have a script I've used and modified to send attachments along with an optional HTML body as well...let me know.
Regarding the file path, "E:\System\Data" is where the TM1 data is stored.
Are you saying the file you're trying to attach and your tm1 data directory are in similar location on the E:? If not, have you confirmed your TM1 server can read/write files from E:\System\ExtractFiles\? You perhaps already know this, but for anyone stumbling on this who doesn't, when you run a command from a TI process using ExecuteCommand, it's executed on the server and user account that's hosting that specific TM1 server.
When I've done things like this in powershell in the past, I always make sure the powershell works first on my local machine before trying to run it from TI process on tm1 server. Have you done that already?
- Tested 2 spaces and 1 space have no difference
- "Attachments" not "Attachment"
If you want to use VBS and a Batch script I have a script I've used and modified to send attachments along with an optional HTML body as well...let me know.
Regarding the file path, "E:\System\Data" is where the TM1 data is stored.
Are you saying the file you're trying to attach and your tm1 data directory are in similar location on the E:? If not, have you confirmed your TM1 server can read/write files from E:\System\ExtractFiles\? You perhaps already know this, but for anyone stumbling on this who doesn't, when you run a command from a TI process using ExecuteCommand, it's executed on the server and user account that's hosting that specific TM1 server.
When I've done things like this in powershell in the past, I always make sure the powershell works first on my local machine before trying to run it from TI process on tm1 server. Have you done that already?
kenship wrote: ↑Sun Sep 04, 2022 7:56 pm
I suppose I can test it in my local machine but then if works in local machine but not on TM1 server then what's does it mean?
It rules out the obvious culprits. Briefly looking at your ps code, I don't see anything glaringly wrong. I normally don't construct powershell code right in a TI, preferring to save off to a ps1 file and then call that via TI ExecuteCommand. This allows me to ensure that the script itself is sound before trying to call via TI and if TI call doesn't work then it may be an execution policy or some other factor.
This is grasping at straws, but although I don't see any spaces in your attachment filename, you could try wrapping it in double quotes.
kenship wrote: ↑Tue Sep 06, 2022 1:57 pm
The command has to be run in Epilog not Prolog. Not sure why because the working TI has been in Prolog all the time.
Were you doing something else in the prolog like generating the export file you were trying to attach to email?
kenship wrote: ↑Tue Sep 06, 2022 1:57 pm
The command has to be run in Epilog not Prolog. Not sure why because the working TI has been in Prolog all the time.
Were you doing something else in the prolog like generating the export file you were trying to attach to email?
kenship wrote: ↑Tue Sep 06, 2022 2:15 pm
When I was testing -Attachments, it's all run from Prolog. I was testing to attach a file already in the data directory.
Now it's run from Epilog, attaching a file in the data directory. There's no asciiOutput run at all.
kenship wrote: ↑Tue Sep 06, 2022 1:57 pm
The command has to be run in Epilog not Prolog. Not sure why because the working TI has been in Prolog all the time.
Were you doing something else in the prolog like generating the export file you were trying to attach to email?
I am attaching the Process, VBS script and the Batch file that's used in conjunction with a separate HTML create process. The items I have will create an HTML email body along with an attachment if you need that as well.
Thanks! I'll probably stick with what I have for now. We wanna keep things as simple as possible since we don't have the admin. right to the Windows server and we can only work with whatever we can in Architect.
kenship wrote: ↑Tue Sep 06, 2022 2:15 pm
When I was testing -Attachments, it's all run from Prolog. I was testing to attach a file already in the data directory.
Now it's run from Epilog, attaching a file in the data directory. There's no asciiOutput run at all.
Were you doing something else in the prolog like generating the export file you were trying to attach to email?
I am attaching the Process, VBS script and the Batch file that's used in conjunction with a separate HTML create process. The items I have will create an HTML email body along with an attachment if you need that as well.