How can I copy files which is not exists? -


i want write .bat file, have 2 folders names , b. have pictures on , , want transfer them b , want transfer pictures not exists. pictures names 1.jpg 2.jpg ,,,,90.jpg how can that? possible?

in folder there

1.jpg 2.jpg ... 40.jpg 

in folder b there

1.jpg 2.jpg ... 90.jpg 

i want transfer 41.jpg,,,,,90.jpg code should dynamic because file names changed next time.

thanks

you can enumerate pictures in a

for %%f in (a\*) 

then check whether exist in b

if not exist "b\%%~nxf" 

and copy them if don't

copy /y "%%f" b 

in summary:

for %%f in (a\*) if not exist "b\%%~nxf" copy /y "%%f" b 

that is, if understood correctly want copy images not present in b. question little confusing in regard because seem want copy images b don't exist in a, doesn't make sense.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -