简体   繁体   中英

Using robocopy to copy files/folders with spaces is insane

I've looked at a dozen articles regarding how to copy a source and destination containing spaces using robocopy. Nothing I've tried works! I've tried a mind numbing number of double quotes, single quotes, with and without spaces after the names as shown below, nothing I've tried works! I've tried adding a . after the target, nada. Considering that many solutions I've read do work, I'm wondering if it's my version of robocopy or windows? I'm currently on Windows 10 Enterprise version 1803.

robocopy "C:\Users\zbernie\Desktop\1 Source Folder with Spaces\bernie3_firsts - Copy.txt " "C:\Users\zbernie\Desktop\1 Target Folder With Spaces " /e 

Evidently you cannot specify a file name as the source. Using folders as source and targets, and THEN the files to be copied worked.

robocopy "C:\Users\zbernie\Desktop\1 Source Folder with Spaces" "C:\Users\zbernie\Desktop\1 Target Folder With Spaces" *files* /e

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM