I have been trying to copy all files in the various subdirectories that have a
jpg extension located on
C: into a single directory on
D:. I don't want to preserve the directory structure.
This is as far as I have gotten:
for /r C:\ %f in (*.jpg) do @copy "%f" D:\pictures
After this point, I'm asked if I want to overwrite
D:\pictures. If I answer
yes, I wind up with a single file, and if I answer no, no files get copied.
I also tried adding
/y at the end of the command, but it just overwrites the preceding files leaving only the last one.