2011-03-15 4 views
0

: 나는 PLS 도움이 작동 얻이 수없는 것창 cmd를 명령 -이 명령을 실행할 때 나는 오류를 받고 있어요 구문 오류

for /f "delims=|" %f in ('dir /b y:\db\b') do "Y:\robocopy.exe" "y:\db\b\%f\" "y:\db\a\%f\Certificates and deliverables\" /e 

"Y:\robocopy.exe" "y:\db\b\a 001\" "y:\db\a\a 001\Certificates and deliverables\" /e 

------------------------------------------------------------------------------- 
    ROBOCOPY  ::  Robust File Copy for Windows  ::  Version XP010 
------------------------------------------------------------------------------- 

    Started : Tue Mar 15 14:06:41 2011 

    Source : y:\db\b\a 001" y:\db\a\a\ 
    Dest : y:\db\b\001\Certificates\ 

    Files : and 
      deliverables" 

    Options : /S /E /COPY:DAT /R:1000000 /W:30 

------------------------------------------------------------------------------ 

2011/03/15 14:06:41 ERROR 123 (0x0000007B) Accessing Source Directory y:\db\b\a 001" y:\db\a\a\ 
The filename, directory name, or volume label syntax is incorrect. 

.

답변

0

명령 줄을 구문 분석 할 때 \"을 이스케이프 처리 된 "으로 처리하는 명령이 있습니다.

백 슬래시를 두 배로 늘리십시오.

또한 MSVCRT와 관련하여 This reference을 참조하십시오 (종속성 워커는 robocopy가 MSVCRT를 사용함을 보여줍니다).

내가 제안하자

for /f "delims=|" %f in ('dir /b y:\db\b') do "Y:\robocopy.exe" "y:\db\b\%f\\" "y:\db\a\%f\Certificates and deliverables\" /e 
+0

확인 그래서 무엇을해야 :

레이몬드 첸은이 문서를 참조하십시오? – Andre

+0

@Andre :이 작업은 매우 까다 롭습니다 ... 여기에 예제 명령 줄이 있습니다. – Benoit

관련 문제