copy#
- Files.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.
Fname2defaults toFname1.- ext2
str Filename extension (eight-character maximum).
Ext2defaults 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.Exton the master process and forFnameN.Exton 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.DATtoA.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.Ext1toFname2.Ext2by default. However, whenDistKeyis set to 1 (or ON, or YES) or 2 (or BOTH), the command is executed by all processes. In this case,Fname1andFname2will automatically have the process rank appended to them. This meansFname1N.Ext1will be copied toFname2N.Ext2by all processes, whereNis the DMP process rank. For more information see in the Parallel Processing Guide.