Command Prompt can’t read directory or file with spaces

Situation: The client run robocopy command to copy a directory with spaces, it doesn’t work, for example

robocopy D:\SharedDocs\Air Export G:\Air Export /MIR /COPYALL /XO /R:1 /W:1 /log:c:\aes.txt

Resolution use the double-quotes, for example

robocopy “D:\dy\SharedDocs\Air Export” “G:\Air Export” /MIR /COPYALL /XO /R:1 /W:1 /log:c:\aes.txt

Published by

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com

Leave a Reply