1
The Intent is to copy files .jpg to a subfolder called \image, and the others, I mean, different files from .jpg, to the folder \New folder (2)\.
Only it’s not working, which could be wrong?
Below the code batch that I’m using:
cls
@echo COPIANDO ARQUIVOS JPEG
for %%f in (*.*) do (
if %%f equ *.jpg (
copy %%f "C:\Users\anezio\Desktop\Nova pasta (2)\imagem"
) else (
copy %%f "C:\Users\anezio\Desktop\Nova pasta (2)"
)
)
pause
What mistake are you encountering? What do you expect to happen, and what is happening?
– carlosfigueira
Actually the file, when executed, does not meet the first condition (where you should copy .jpg files to the image folder), running only the copy after 'Else''.
– Anézio