Copy Files /w Spaces In Name
问题 My code is SET usb="%CD%\Dokument\%USERNAME%\" mkdir %usb% for /R "C:\Users\%USERNAME%\" %%f in (*.docx) do copy %%f %CD%\Document\%USERNAME%\ and it works, but not for files (.docx) with spaces in their name. I've tried fixing it with quotes, and different code styles/methods, but can't solve it. (I'm new to DOS). How can I solve this? Or is there a better code to copy all the files with .docx extension from a computer to another directory/usb? 回答1: You need to quote file paths containing