Hi,
How to write content to a new file or append content to an existing file in Campaign Classic - Workflows?
Solved! Go to Solution.
Hi,
if I understand correctly, you have a text file on your adobe campaign server and want to edit it from a workflow.
If so you have a couple of ways to do this :
you can use a script activity, check the the process error option and print vars.output in JS activities afterwards.
to print long logs I like to use this :
var lines = vars.output.split("\n");
for each (var line in lines){
logInfo("" + line);
}
You can also do it all from a JS activity with execCommand (see API doc) :
var result = execCommand('echo "some data for the file" >> fileName');
logInfo(result);
You also have a bunch of methods in JS to access/edit files (cfr API doc) like writeIn.
Kind regards,
Pierre
Moved to Adobe Campaign Classic
Hi,
if I understand correctly, you have a text file on your adobe campaign server and want to edit it from a workflow.
If so you have a couple of ways to do this :
you can use a script activity, check the the process error option and print vars.output in JS activities afterwards.
to print long logs I like to use this :
var lines = vars.output.split("\n");
for each (var line in lines){
logInfo("" + line);
}
You can also do it all from a JS activity with execCommand (see API doc) :
var result = execCommand('echo "some data for the file" >> fileName');
logInfo(result);
You also have a bunch of methods in JS to access/edit files (cfr API doc) like writeIn.
Kind regards,
Pierre
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies