bwall256 0 Newbie Poster

Please tell me - Why does this not work!?

@set here=D:\STORE\movies\xfire
@set there=D:\STORE\movies\xfire\pics
@if not exist pics md pics
for %%X in (*.jpg *.gif *.png *.bmp) do (move %%x %there%)

pause

This is sooo annoying it prints the %%x as %x and only does it once.
It literally just does this:

D:\STORE\movies\xfire>move D:\STORE\movies\xfire\%x D:\STORE\movies\xfire\pics
The system cannot find the file specified.

Which is frigging weak.

What have I done wrong? using %x intead of %%x does not fix

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.