On this page
Help Center/ CodeArts Deploy/ FAQs/ Custom Application Actions/ Copying a File/ Action Copy Files Deployed Successfully, But the Expected Result Is Not Achieved

Action Copy Files Deployed Successfully, But the Expected Result Is Not Achieved

Updated on 2023-11-28 GMT+08:00

Symptoms

The result shows that the action Copy Files is successfully deployed, but the expected result is not achieved.

After the deployment is complete, a new file is generated in the destination path. The file name is the same as the destination path and does not have a file name extension.

Figure 1 Task template path
Figure 2 New file generated on the target host

As a result, the following situations occur:

  • If the source file to be copied is a text file, you can still edit the new file after the copy is complete.
  • If the source file to be copied is not a text file, garbled characters are displayed when you edit the new file after the copy is complete.

Cause Analysis

If the destination path of the file to be copied does not end with a forward slash (/), the system copies the file by renaming it. If the file name already exists, the existing file will be overwritten.

Solution

  • If the name and format of the source file are determined, specify the directory, file name, and file format in the destination path.
  • If you want to copy multiple files or copy them to a directory, the destination path must end with a forward slash (/).
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback