.. _files_generated_by_mtut_script:

Files Generated by MTut Script
================================
    
This section discusses how the :ref:`mtut_script` saves files to disk. After running a multi-tutorial script, named 'my_mtut_script.pyml', as follows:-

.. code-block:: console

    popy run my_mtut_script.pyml

the output folder will contain three new scripts:-

.. code-block::

    my_mtut_script.pyml_output/
        <mtut_name>_mgen.pyml
        <mtut_name>_mfit.pyml
        <mtut_name>_mcomp.pyml
        
Note the multi-tutorial output folder name **my_mtut_script.pyml_output** is derived from the multi-tutorial script filename. However the generated script file names are based on the following entry:-

.. code-block:: pyml

    DESCRIPTION: {name: <mtut_name>}

This naming convention for output folders and generated scripts is followed by all :ref:`script_formats` in |popy|.

It is worth naming your scripts and description names with this in mind, i.e., short names without spaces are recommended. 
    
For a :ref:`mtut_script` the three subscripts are usually run automatically, see :numref:`table_mtut_script_sub_outputs` for links to the files generated by each of the subscripts, in their own sub folders.

.. _table_mtut_script_sub_outputs:

.. list-table::
    :header-rows: 1
    
    * - Script
      - Outputs

    * - <mtut_name>_mgen.pyml
      - :ref:`mgen outputs<files_generated_by_mgen_script>`

    * - <mtut_name>_mfit.pyml
      - :ref:`mfit outputs<files_generated_by_mfit_script>`
      
    * - <mtut_name>_mcomp.pyml
      - :ref:`mcomp outputs<files_generated_by_mcomp_script>`
      
These three scripts are run in order. When all three scripts are run then you end up with a file structure like:-

.. code-block::

    my_mtut_script.pyml_output/
        <mtut_name>_mgen.pyml_output/
        <mtut_name>_mfit.pyml_output/
        <mtut_name>_mcomp.pyml_output/



