Last active
March 27, 2022 10:39
-
-
Save craigvantonder/5d9ee6eb0d2267b28271da3908abc10d to your computer and use it in GitHub Desktop.
Windows batch file to recursively copy all files of a specific type to an output directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
set DIR=C:\path\from | |
set OUTPUTDIR=C:\path\to | |
for /R %DIR% %%G in (*.jpg *.jpeg) do copy "%%G" "%OUTPUTDIR%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to copy each file in each folder :)
like if I found file called cat.jpg in animals folder I want to create animal folder in OUTPUTDIR and add cat.jpg into it