In my "pic" folder i have multiples jpg pictures, some of them with suffix "_ok" or "_psd". I want to copy all my jpg files in my "sel" subfolder, but if my jpg file has also a suffix version, i want to copy only the sufffix version. Example : from A.jpg, B.jpg, C.jpg, C_OK.jpg, D.jpg, D_psd.jpg, i want to copy only DSC01.jpg, B.jpg, C_OK.jpg, D_psd.jpg. I began the loop and i'm already lost with the if statement.
for /D %%i in ("C:\pic\*") do ROBOCOPY C:\pic *.jpg C:\pic\sel\
NB : i use robocopy because xcopy doesn't work in my batch files (only in cmd)
Aucun commentaire:
Enregistrer un commentaire