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 -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -