Monday, June 6, 2022

win os - How to copy all files defined by mask in all subdirectories into one directory

Copy all *.mobi files in current directory and all subdirectories into c:\temp\mobi directory. 
The destination directory must exists.
find . -name \*.mobi -exec cp {} c:/temp/mobi/ \;
UPDATE: Better variant:
for /r %i in (*.epub) do xcopy /Y "%i" c:\temp\mobi

No comments:

Post a Comment