Jump to content
Sign in to follow this  
danielbighelini

Create TXT file in SPELL

Recommended Posts

Does anyone know any method SPEL that directs the contents of a variable to a TXT file?

The only way I found was running a shell with the function 'exec':

zs_filename = "C:\\text_cmd_dbb2.txt";

zs_content + = "% assignee = servicedesk";

zs_content + = "% CUSTOMER servicedesk =";

zs_content + = "% CATEGORY = Add.it";

zs_content + = "% SUMMARY = Test incident open";

zs_content + = "% DESCRIPTION = bla bla bla bla bla";

zs_content + = "% {PROPERTY = {Name:}} John Dohn";

zs_content + = "% {PROPERTY = {Country: Brazil}}";

zs_cmd = format ("CMD / U / C ^% s>% s", zs_content, zs_filename);

exec (zs_cmd);

Does anyone know another way to use the command 'expand' or the command 'printf'?

I appreciate the attention.

Edited by Bighelini

Share this post


Link to post
Share on other sites

I think expand can read a - text - file, but I don't know any syntax of it to write to a file. The only way to write something AFAIK is to invoke an external command and passing some parameters - like you did.

Share this post


Link to post
Share on other sites
I think expand can read a - text - file, but I don't know any syntax of it to write to a file. The only way to write something AFAIK is to invoke an external command and passing some parameters - like you did.

Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...