2017-12-21 18 views
0

갖는 문제를 특정 유형의 모든 파일을 이동 :명령 줄 cmd를 프롬프트 명령 NO 덮어 쓰기/y는 작동하지

for /r E:\ %f in (*.jpg) do @move "%f" "E:\jpg" /Y 

이 명령 줄은 내가 의도 한대로 작동하지 않습니다. 내 외장 드라이브 (E :/jpg)의 특정 유형 (예 : jpg)의 외장 드라이브에있는 모든 파일을 폴더로 이동하려고합니다.

제안 사항 ???

1. (with /Y)

Microsoft Windows [Version 10.0.16299.125] 
(c) 2017 Microsoft Corporation. All rights reserved. 

C:\Users\█████>for /r E:\ %f in (*.jpg) do @move "%f" "E:\jpg" /Y 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 

서로 다른 크기 나 타임 스탬프를하지 않는 한 대상에 파일을 덮어 쓰지 않습니다 기본적으로, 당신의 robocopy 대신 이동 중 사용할 수있는 파일을 이동에 대한 2. (without /Y)

Microsoft Windows [Version 10.0.16299.125] 
(c) 2017 Microsoft Corporation. All rights reserved. 

C:\Users\█████>for /r E:\ %f in (*.jpg) do @move "%f" "E:\jpg" 
Overwrite E:\jpg\10255420_10200945699085042_5035519864603771578_n.jpg? (Yes/No/All): Yes 
     1 file(s) moved. 
Overwrite E:\jpg\10307411_10201163984180409_2977646430196181302_n.jpg? (Yes/No/All): 
+1

를 참조 현재 디렉토리에 대한 환경 변수입니다 실행중인 명령이 표시됩니다. – ACatInLove

+1

'move /?'의 출력을 읽고 문법을 수정하십시오. (swich의 위치를 ​​적어 두십시오) – Stephan

+1

'E : \ jpg'에있는 각 복사 된'.jpg' 파일이 다시 선택되지 않도록해야합니다 '(* .jpg)'와 '덮어 쓰기'에 의해'이동 '되어 그 자체가 끝없이 반복됩니다. 나는 당신이'$ RECYCLE.BIN'에서 파일을'이동 '하고 있음을 알아 차렸다. 더 안전하게하려면 'cmd.exe'가'관리자 권한으로 실행 '이라고 제안합니다. – Compo

답변

0

하고, 여러 파일을 처리합니다.

당신은

robocopy %cd% "E:\jpg" *.jpg /MOV

메모와 함께 한 줄 그것을 수행 할 수 있어야합니다 cd 당신은`당신을`@를 제거하면

https://ss64.com/nt/robocopy.html