Many thanks to all who thought about a solution!
With the following manual workaround I realised the transfer of the Publish HTML output to the target location. After having run the main script I trigger a "post processing" for the Publish Output and run the following script file:
%%Move the Publish output in the specimen MATLAB result folder
% stack = dbstack;
% isBeingPublished = ismember('publish', {stack.name}); % this variable is set in main script
if isBeingPublished
myScriptFile = mfilename('fullpath'); % location of script file
[BaseDir,~,~] = fileparts(myScriptFile);
fname = fullfile(BaseDir,'html');
if exist (fname,'dir') == 7 % if the directory still exists
fnameNew = fullfile(strcat(fileparts(path),'/',newDir,'/html_',num2str(counter),dataFilePart)); % specified path and new folder name
movefile(fname,fnameNew); % move to target location
msgbox({'Published HTML output successfully' 'moved to target location'},'Info')
else
if exist(fnameNew,'dir') == 7 % Another run of this script doesn't harm
msgbox({'Published HTML output already' 'moved to target location'},'Info')
else
msgbox({'No result folder found!' '-- Something really went wrong!'}, 'Attention', 'error') % last exit - think ... :-)
end
end
end
If someone can trigger this script from the main script - please let me know how to manage this.