how can I copy all .png files in my current directory to a folder in my current directory called "src"?

I tried this code:

copy .*.png /src 

and it didn't work for me.


remove the forward slash so

copy *.png src
  • We have a winner! – Linker3000 Apr 27 '11 at 19:27

You had an extra period in the source, try this :

copy *.png /src
  • ..and that states src is off the root and not a local subfolder - remove the slash. – Linker3000 Apr 27 '11 at 19:25

If the src subdirectory exists...try

copy *.png .\src\*.png
  • Way overcomplicated – Linker3000 Apr 27 '11 at 19:26
  • ... but nonetheless correct where other answers placed the target directory in the root directory, and also not prone, as other answers are, to silently doing something quite different to what the questioner desired whenever there's no directory named "src". – JdeBP May 16 '11 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.