Command Prompt - Empty spaces not supported

December 2016





Issue


You want to make a command that targets a specified path, but it includes a space on a file.


Example:

You want to make a copy from one directory to another:
copy c:\File to be copied\ e:\backup folder\



You get the following message: The specified file is not found.

Solution


It's very simple, just put quotation marks around the folder with space or more, like this:
copy c:\"File to be copied"\ e:\"backup folder"\



Note: The easiest way to avoid this kind of message is to use the underscore "_" instead of space when naming your files and folders.

Related :

This document entitled « Command Prompt - Empty spaces not supported » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.