cmd - How to copy only files(not directories) using batch file? -
the directory structure is:
  images     -folder1       -image1.jpg       -image2.jpg     -folder2       -image3.jpg       -image4.png      -folder3       -image6.png       -image7.jpg      -folder4 i want copy images(i.e *.jpg, *.png) files (not folders) parent directory("images").
i have tried using "robocopy" follows:
robocopy /np ..\..\exam\images ..\..\exam\images *.jpg *.png /s here files folders copied :(. need files copied. how this?
many many in advance!
try on command line:
for /r "images" %i in (*.jpg *.png) copy "%~fi" "my\target folder" for bach script %  must doubled %%.
Comments
Post a Comment