command prompt - Copy all txt files from all subfolders using xcopy -


i have been tasked copying .txt files program files folder of it's subdirectories folder have created. script have:

xcopy c:\"program files"\*\*.txt c:\temp\myfiles\lessons 

doesn't want work. missing?

if want maintain folder structure,

xcopy /s "c:\program files\*.txt" c:\temp\myfiles\lessons 

if not,

for /r "c:\program files" %a in (*.txt) @copy /y "%a" c:\temp\myfiles\lessons 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

excel - I can't get the attachement of the email PHP -

node.js - Express and Redis - If session exists for this user, don't allow access -