How would I alter this code to make it non-recursive?
FOR /R %pathold% %%G in (*.tif *.tiff *.jpg *.jpeg *.pdf) do (
move "%%G" %pathnew%>NUL
echo %%G
)
I tried using ForFiles
, but it doesn't support multiple Wildcards.
ForFiles /P %pathold% /M *.tif *.tiff *.jpg *.jpeg *.pdf /C "move @path %pathnew%"
ERROR: Invalid argument / option - '* .tiff'.