copy#
- Mapdl.copy(fname1='', ext1='', fname2='', ext2='', distkey='', **kwargs)#
Copies a file.
APDL Command: /COPY
- Parameters:
- fname1
File name to be copied and its directory path (248 characters maximum for both file name and directory). If you do not specify a directory path, it will default to your working directory and you can use all 248 characters for the file name.
- ext1
Filename extension (eight-character maximum).
- fname2
File name to be created and its directory path (248 characters maximum for both file name and directory). If you do not specify a directory path, it will default to your working directory and you can use all 248 characters for the file name.
- ext2
Filename extension (eight-character maximum).
- distkey
Key that specifies whether the copy operation is performed on all processes in distributed parallel mode (Distributed ANSYS):
0 (OFF or NO) - The program performs the copy operation only on the master process (default).
1 (ON or YES) - The program performs the copy operation locally on each process.
2 or BOTH - The program performs the copy operation for Fname.Ext on the master process and for FnameN.Ext on all processes.
Notes
The original file is untouched. Ex: /COPY,A,,,B copies file A to B in the same directory. /COPY,A,DAT,,,INP copies the file A.DAT to A.INP. See the Operations Guide for details. ANSYS binary and ASCII files can be copied.
In distributed parallel mode (Distributed ANSYS), only the master process will copy 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 copied 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.