KB Issue
Renaming a file with spaces in the name will give you an error when using a DOS Prompt or Command Prompt.
Issue Details
When using a DOS prompt or command prompt and trying to rename a file that has spaces in the name, my file.txt
Copy
Search Site
Search Google
will result in an error.
File Rename Error
The syntax of the command is incorrect
.
The use of Wildcards will be needed to rename your spaced files and folders
Recreate Issue
Perform the following action in a command prompt
Substituting the U:\Files
Copy
Search Site
Search Google
For your actual drive and folder path.
U:\Files\rename my file.txt my file.doc
Copy
Search Site
Search Google

The command syntax is incorrect.
Resolve Issue
To properly write out the DOS command to rename your file with spaces, perform the following action. This command will come in handy if you are unable to rename the file in Windows because it is in use.
U:\Files\rename my?file.txt my?file.doc
Copy
Search Site
Search Google
As you can see above, we have added a Question Mark ?
Copy
Search Site
Search Google
In place of the spaces in the name of the file.
What this does is give a legal DOS filename character.
If you leave the ?
Copy
Search Site
Search Google
mark off from the output filename like this
U:\Files\rename my?file.txt my file.doc
Copy
Search Site
Search Google

The output renamed file will be my file.doc
Copy
Search Site
Search Google

See, the ?
Copy
Search Site
Search Google
in the original filename adds an underscore to the output filename.
But adding the ?
Copy
Search Site
Search Google
to the output filename lets you rename the file with the original space still intact.