2017-10-02 3 views
0

이 스크립트는 robocopy에 대해 오류 코드 3을 계속 제공하지만 의도 한대로 작동합니다. 캡처 할 로그 파일을 만들었고 명령 줄과 스크립트에서 정상적으로 실행되지만 TFS 2015의 My Build에서 여전히 오류가 발생합니다. 어떤 아이디어입니까?배치 스크립트는 의도 한대로 작동하더라도 오류 코드 3을 계속 나타냅니다.

TFS 오류를 구축 :

예외 메시지 : TF270015은 'RolltoDEV.bat는'예상치 못한 종료 코드를 반환했습니다. 예상 '0'; 실제 '3'. ------------------

:

다음
@echo off 
set root="D:\Drop\PythonAutomation\1-DEV\PythonAutomation - CD to DEV" 
CD /D %root% 
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /od') DO SET a=%%i 
CD /D C:\ 

robocopy "C:\Builds\1004\PythonAutomation\PythonAutomation - CD to DEV\src\PythonAutomation" "D:\Drop\PythonAutomation\1-DEV\PythonAutomation - CD to DEV\%a%" /E /log:D:\logFileForPython.txt 

robocopy "C:\Builds\1004\PythonAutomation\PythonAutomation - CD to DEV\src\PythonAutomation" "D:\PythonAutomation" /E /log+:D:\logFileForPython.txt 

로그 파일 : 여기

내 스크립트입니다 -------------------------------------------------- ----------- ROBOCOPY :: Windows 용 강력한 파일 복사


D : \ 드롭 \ PythonAutomation \ -

시작 : 2017년 10월 2일 (월요일) 오전 11시 4분 27초 출처 : C는 DEV \ SRC \ PythonAutomation \ 신지에 CD를 \는 PythonAutomation \ PythonAutomation \ 1004 \ 구축 1 DEV \ PythonAutomation - DEV \ PythonAutomation에 CD - DEV_20171002.23 \에 CD

Files : *.* 
    Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30 

    3 C:\Builds\1004\PythonAutomation\PythonAutomation - CD to DEV\src\PythonAutomation\ *EXTRA Dir  -1 D:\Drop\PythonAutomation\1-DEV\PythonAutomation - CD to DEV\PythonAutomation - CD to DEV_20171002.23\logs\ 
    New File   1324 PythonAutomation.log 0% 100% 
    New File   1255 PythonAutomation.sln 0% 100% 
    New File    221 PythonAutomation.sln.Any CPU.Debug.vsprops 0% 100%  New Dir   

1 C는 : \ 1004 \ 빌드 \ PythonAutomation \ PythonAutomation - DEV에 CD \ SRC \ PythonAutomation \ PythonAutomation \ 새 파일 3 552 PythonAutomation.pyproj 0 % 100 % 새로운 디렉터리 0 C는 : \ 1004 \ 빌드 \ PythonAutomation \ PythonAutomation - CD 은 \ SRC \ PythonAutomation \ PythonAutomation \ BaseObjects \ 새로운 디렉터리
1 C를 DEV합니다 : \는 PythonAutomation \ PythonAutomation \ 1004 \ 구축 - CD를 DEV \ src \ PythonAutomation \ PythonAutomation \ Configuration \ 새 파일 374 Config-Main.py 0 % 100 % 새 디렉터리 0 C : \ Builds \ 1004 \ PythonAutomation \ PythonAutomation - CD를 DEV \ src \ PythonAutomation \ PythonAutomation \ 구성 \ 등록 \
새로운 디렉터리 0 C는 : \ 1004 \ PythonAutomation \ PythonAutomation \ 구축 - CD DEV 에 \ SRC \ PythonAutomation \ PythonAutomation \ 구성 \ 등록 \ PublishProfiles \ 새로운 디렉터리 1 C : \ 1004 \ 구축 \ PythonAu tomation \ PythonAutomation - CD에서 DEV \ src \ PythonAutomation \ PythonAutomation \ Configuration \ Properties \ PublishProfiles \ RolltoDEV \ 새 파일 520 RolltoDEV.bat 0 % 100 % 새 디렉터리 0 C : \ Builds \ 1004 \ PythonAutomation \ PythonAutomation - DEV \ SRC \ PythonAutomation \ PythonAutomation \ 등록 \ 새로운 디렉터리
0 C는 : \ 1004 \ PythonAutomation \ PythonAutomation \ 구축 - CD에 DEV \ SRC \ PythonAutomation \ PythonAutomation \ PythonAutomation \ 새로운 디렉터리 4 C : \ 1004 \ 구축 \는 PythonAutomation \ PythonAutomation - DEV에 CD \ SRC \ PythonAutomation \ PythonAutomation \ PythonAutomation \ BaseObjects \ 새 파일 2664 Email.py 0 % 100 %
새 파일 573 File.py 0 % 100 %
새 파일 1260 SSH 연결.평 0 % 100 %
새 파일 342 초기화 평 0 % 100 % 새로운 디렉터리 0 C : \ 1004 \ \ PythonAutomation \ PythonAutomation 구축 - CD DEV에 \ SRC \ PythonAutomation \ PythonAutomation \ PythonAutomation \ 등록 \ 새로운 DIR 0 C는 : \ 1004 \ PythonAutomation \ PythonAutomation \ 빌드 - CD는 DEV하는 \ SRC \ PythonAutomation \ PythonAutomation \ PythonAutomation \ 등록 \ PublishProfiles \ 새로운 디렉토리 3 C : \는 PythonAutomation \ PythonAutomation \ 1004 \ 구축 - DEV에 CD \ src \ PythonAutomation \ PythonAutomation \ PythonAutomation \ Properties \ PublishProfiles \ PublishProfiles \ 새 파일 864 RolltoDEV.pubxml 0 % 100 %
새 파일 934 RolltoPROD.pubxml 0 % 100 %
새 파일 922 RolltoQA.pubxml 0 % 100 %


  Total Copied Skipped Mismatch FAILED Extras 
Dirs :  13  12   0   0   0   1 Files :  13  13   0   0   0   0 

바이트 : 14.4 K, 14.4 K 0 0 0 0
시간 : 0시 0분 0초 0시 0분 0초 0시 : 00 0:00:00
종료일 : 2017 년 10 월 2 일 월요일 11:04:27 AM

------------------------ -------------------------------------------------- ----- ROBOCOPY :: Windows 용 강력한 파일 복사


시작 : 2017년 10월 2일 (월요일) 오전 11시 4분 27초 자료 : C : \ 1004 \ \ PythonAutomation \ PythonAutomation 구축 - CD DEV에 \ SRC \ PythonAutomation \ 대상 : D : \ PythonAutomation

\
Files : *.* 
    Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30 

    3 C:\Builds\1004\PythonAutomation\PythonAutomation - CD to DEV\src\PythonAutomation\ *EXTRA Dir  -1 D:\PythonAutomation\.vs\ *EXTRA Dir  -1 D:\PythonAutomation\Outputs\ 
    New File   1324 PythonAutomation.log 0% 100% 
    New File   1255 PythonAutomation.sln 0% 100% 
    New File    221 PythonAutomation.sln.Any CPU.Debug.vsprops 0% 100%  New Dir   

1 C는 : \ 1004 \ 빌드 \ PythonAutomation \ PythonAutomation - CD에 DEV \ SRC \ PythonAutomation \ PythonAutomation \ 새 파일 3552 PythonAutomation.pyproj 0 % 100 % 새로운 디렉터리 \ 1004 \ \ PythonAutomation \ PythonAutomation 구축 - CD DEV \ SRC \ PythonAutomation \에 - : 0 C는 \ SRC \ PythonAutomation \ PythonAutomation \ BaseObjects \ 새로운 디렉터리
1 C를 DEV하는 CD \ 1004 PythonAutomation \ PythonAutomation \ \ 구축 PythonAutomation \ Configuration \ 새 파일 374 Config-Main.py 0 % 100 % 새 디렉터리 0 C : \ Builds \ 1004 \ PythonAutomation \ PythonAutomation - CD DEV \ src \ PythonAutomation \ PythonAutomation \ Configuration \ Properties \
새 디렉터리 0 C : \ Builds \ 1004 \ PythonAutomation \ PythonAutomation - CD에 DEV \ src \ PythonAutomation \ PythonAutomation \ Configuration \ Properties \ PublishProfiles \ 새 디렉터리 1 C : \ Builds \ 1004 \ PythonAutomation \ PythonAutomation - CD를 DEV \ src \ PythonAutomation \ PythonAutomation \ Configuration \ Properties \ PublishProfiles \ RolltoDEV \ 새 파일 520 RolltoDEV.bat 0 % 100 % 새 디렉터리 0 C : \ Builds \ 1004 \ PythonAutomation \ PythonAutomation - CD를 DEV \ SRC \ PythonAutomation \ PythonAutomation \ 등록 \ 새로운 디렉터리
0 C는 : \ 1004 \ PythonAutomation \ PythonAutomation \ 구축 - CD에 DEV \ SRC \ PythonAutomation \ PythonAutomation \ PythonAutomation \ 새로운 디렉터리 4 C : \는 \ PythonAutomation \ 1004 \ 구축 PythonAutomation - CD를 DEV \ src \ PythonAutomation \ PythonAutomation \ PythonAutomation \ BaseObjects \ 새 파일 2664 Email.py 0 % 100 %
새 파일 573 파일.평 0 % 100 %
새 파일 1260 SSHConnection.py 0 % 100 %
새 파일 342 초기화 평 0 % 100 % 새로운 디렉터리 0 C가 : \ 1004 \ 빌드 \ PythonAutomation \ PythonAutomation - CD 에 DEV \ \ 빌드 : - : SRC \ PythonAutomation \ PythonAutomation \ PythonAutomation \ 등록 \ 새로운 디렉터리 0 C CD가 \ SRC \ PythonAutomation \ PythonAutomation \ PythonAutomation \ 등록 \ PublishProfiles \ 새로운 디렉터리 3 C를 DEV하기 위해 1004 \ PythonAutomation은 \ PythonAutomation가 는 \ \는 구축 \ 1004 \ PythonAutomation \ PythonAutomation - CD에서 DEV \ src \ PythonAutomation \ PythonAutomation \ PythonAutomation \ Properties \ PublishProfiles \ PublishProfiles \ 새 파일 864 RolltoDEV.pubxml 0 % 100 %,210 새 파일 934 RolltoPROD.pubxml 0 % 100 %
새 파일 922 RolltoQA.pubxml 0 % 100 %


  Total Copied Skipped Mismatch FAILED Extras 
Dirs :  13  12   0   0   0   2 Files :  13  13   0   0   0   0 

바이트 : 14.4 K, 14.4 K 0 0 0 0
시간 : 0 : 00:00 0:00:00 0:00:00 0:00:00

속도 : 1057500 바이트/초. 속도 :
60.510 메가 바이트/분. 종료 : 2017 년 10 월 2 일 월요일 11시 4 분 27 초

+2

이 링크보기 https://ss64.com/nt/robocopy-exit.html 0 × 03 3 (2 + 1) 일부 파일이 복사되었습니다. 추가 파일이 있습니다. 실패하지 않았습니다. – RGuggisberg

+0

도움을 주셔서 감사합니다! 이 정보로 내가 한 일에 대한 내 대답을보십시오. @RGuggisberg – Pintang

답변

0

이 문제가 발생할 수있는 사람은 오류가 배치 스크립트에서 실제로 오류가 아니기 때문에 TFS에서 여전히 작동하고있었습니다. 오류 메시지는 오류 메시지이므로 실패했습니다. 이 문제를 해결하기 위해 수행 한 작업은 robocopy 문의 끝에 다음 코드를 추가하여 배치 스크립트에서이 특정 오류를 우회하는 것입니다.

2>&1|find /v "TF270015" 

앞으로 도움이되기를 바랍니다. 나에게 실제 오류 메시지가 표시되면 @RGuggisburg에게 감사합니다.

+1

공유해 주셔서 감사합니다. [답변으로 수락하십시오] (https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) 이것은 유익 할 수 있습니다. 이 스레드를 읽는 다른 커뮤니티 회원. –

+0

감사합니다! @ Andy-MSFT – Pintang