rename#

Mapdl.rename(fname1='', ext1='', fname2='', ext2='', distkey='', **kwargs)#

Renames a file.

APDL Command: /RENAME

Parameters:
fname1

The file to be renamed. You can also include an optional directory path as part of the specified file name; if not, the default file location is the working directory.

ext1

Filename extension (eight-character maximum).

fname2

The new name for the file. You can also include an optional directory path as part of the new file name; if not, the default is the working directory. A maximum of 248 characters is allowed for the file name (or combined file name and directory path, if both are specified).

ext2

Filename extension (eight-character maximum).

distkey

Key that specifies whether the rename operation is performed on all processes in distributed parallel mode (Distributed ANSYS):

1 (ON or YES) - The program performs the rename operation locally on each process.

0 (OFF or NO) - The program performs the rename operation only on the master process (default).

Notes

Renames a file. Ex: /RENAME,A,,,B renames file A to B in the same directory. /RENAME,A,DAT,,,INP renames file A.DAT to A.INP. On all systems, this command will overwrite any existing file named B. See the Operations Guide for details. Only ANSYS binary files should be renamed. Use /SYS and system renaming commands for other files.

In distributed parallel mode (Distributed ANSYS), only the master process will rename Fname1.Ext1 to Fname2.Ext2 by default. However, when DistKey is set to 1 (or ON or YES), the command is executed by all processes. In this case, Fname1 and Fname2 will automatically have the process rank appended to them. This means Fname1N.Ext1 will be renamed to Fname2N.Ext2 by all processes, where N is the Distributed ANSYS process rank. For more information see Differences in General Behavior in the Parallel Processing Guide.

Renaming across system partitions may be internally done by a copy and delete operation on some systems.

This command is valid only at the Begin Level.