简体   繁体   English

使用 robocopy 复制带空格的文件/文件夹是疯狂的

[英]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.我已经看了十几篇关于如何使用 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?考虑到我读过的许多解决方案都有效,我想知道这是我的 robocopy 版本还是 windows 版本? I'm currently on Windows 10 Enterprise version 1803.我目前使用的是 Windows 10 企业版 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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