2015-08-12 4 views
1

Я хочу скопировать один файл из папки в рабочем пространстве Jenkins в другую папку. В настоящее время я пытался сделать то же самое с плагином Artifacts Deployer. enter image description here Но он копирует всю структуру папок в папку назначения. Как нижеСкопируйте один файл из рабочего пространства в jenkins в другую папку

enter image description here

Я просто хочу StyleCopViolations.xml быть в DestFolder. Я использую машину для Windows. Пожалуйста помоги.

+0

StyleCopViolations.xml и DestFolder находятся на одной машине Windows? если да, используйте команду пакетной копии COPY – jussuper

ответ

3

На шагов после сборки, добавьте: Run Batch команду

Для команды Batch, добавить их (замена при необходимости):

COPY [source e.g. your workspace] /A [destination e.g. another folder] /A

Источники:

Это:

C:\> help COPY

Copies one or more files to another location. 

COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/L] [/A | /B ] source [/A | /B] 
[+ source [/A | /B] [+ ...]] [destination [/A | /B]] 

    source  Specifies the file or files to be copied. 
    /A   Indicates an ASCII text file. 
    /B   Indicates a binary file. 
    /D   Allow the destination file to be created decrypted 
    destination Specifies the directory and/or filename for the new file(s). 
    /V   Verifies that new files are written correctly. 
    /N   Uses short filename, if available, when copying a file with a 
       non-8dot3 name. 
    /Y   Suppresses prompting to confirm you want to overwrite an 
       existing destination file. 
    /-Y   Causes prompting to confirm you want to overwrite an 
       existing destination file. 
    /Z   Copies networked files in restartable mode. 
    /L   If the source is a symbolic link, copy the link to the target 
       instead of the actual file the source link points to. 

The switch /Y may be preset in the COPYCMD environment variable. 
This may be overridden with /-Y on the command line. Default is 
to prompt on overwrites unless COPY command is being executed from 
within a batch script. 

To append files, specify a single file for destination, but multiple files 
for source (using wildcards or file1+file2+file3 format). 
Смежные вопросы