download

MapdlGrpc.download(files, target_dir=None, chunk_size=262144, progress_bar=True, recursive=False)

Download files from the gRPC instance workind directory

Parameters
filesstr or List[str] or Tuple(str)

Name of the file on the server. File must be in the same directory as the mapdl instance. A list of string names or tuples of string names can also be used. List current files with Mapdl.directory.

Alternatively, you can also specify glob expressions to match file names. For example: ‘file*’ to match every file whose name starts with ‘file’.

chunk_sizeint, optional

Chunk size in bytes. Must be less than 4MB. Defaults to 256 kB.

progress_barbool, optional

Display a progress bar using tqdm when True. Helpful for showing download progress.

recursivebool

Use recursion when using glob pattern.

.. warning::

This feature is only available for MAPDL 2021R1 or newer.

.. note::
  • The glob pattern search does not search recursively in remote instances.

  • In a remote instance, it is not possible to list or download files in different locations than the MAPDL working directory.

  • If you are in local and provide a file path, downloading files from a different folder is allowed. However it is not a recommended approach.

Examples

Download all the simulation files (‘out’, ‘full’, ‘rst’, ‘cdb’, ‘err’, ‘db’, or ‘log’):

>>> mapdl.download('all')

Download every single file in the MAPDL workind directory:

>>> mapdl.download('everything')

Download a single file:

>>> mapdl.download('file.out')

Download all the files starting with ‘file’:

>>> mapdl.download('file*')