ansys.mapdl.core.Mapdl.copy#
- Mapdl.copy(fname1='', ext1='', fname2='', ext2='', distkey='', **kwargs)#
Copies a file.
Mechanical APDL Command: /COPY
- Parameters:
- fname1
str
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.
The file name defaults to the current
Jobname
.- ext1
str
Filename extension (eight-character maximum).
- fname2
str
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.
Fname2
defaults toFname1
.- ext2
str
Filename extension (eight-character maximum).
Ext2
defaults toExt1
.- distkey
str
Key that specifies which copy operation is performed on all processes in distributed-memory parallel mode :
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 forFname
.Ext
on the master process and forFnameN
.Ext
on all processes.
- fname1
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
toA.INP
. See the Operations Guide for details. Mechanical APDL binary and ASCII files can be copied.In distributed-memory parallel (DMP) mode, only the master process will copy
Fname1
.Ext1
toFname2
.Ext2
by default. However, whenDistKey
is set to 1 (or ON, or YES) or 2 (or BOTH), the command is executed by all processes. In this case,Fname1
andFname2
will automatically have the process rank appended to them. This meansFname1N
.Ext1
will be copied toFname2N
.Ext2
by all processes, whereN
is the DMP process rank. For more information see in the Parallel Processing Guide.