Solved Why do files and folders with spaces not get moved?

August 9, 2014 at 10:13:48
Specs: Windows 64
To move the folder "folder 1" to the folder a in cmd , if I type:
move c:\file 1 c:\a
It says:syntax of the command is incorrect.

If I type :
move "c:\ folder 1 c:\a"
it will say 1 dir moved, but it doesnt actually nove the folder at all. Same problem with files.

I know how to remove the space with a batch, but I was wondering if there is a way to actually move files with spaces without changing the name in cmd. Thanks.


See More: Why do files and folders with spaces not get moved?

Report •

#1
August 9, 2014 at 10:18:54
Enclose just the file name in double quotes

move "c:\ folder 1" c:\a

Stuart


Report •

#2
August 9, 2014 at 14:28:16
✔ Best Answer
Yes, you also have to add quotes if there are more than 8 characters present in any path or filename.

Always pop back and let us know the outcome - thanks


Report •

#3
August 9, 2014 at 17:16:37
So it looks like it's still the same in Windows 7 with NTFS as it was
in Windows 98 with FAT 32.

-- Jeff, in Minneapolis


Report •

Related Solutions

#4
August 9, 2014 at 19:22:40
Yes Jeff, I don't think any of that has changed. A few different commands that's all.

Always pop back and let us know the outcome - thanks


Report •

#5
August 9, 2014 at 23:52:32
To add to what's been said, if folder 'a' exists the command should move 'folder 1' into it. If folder 'a' doesn't exist it just renames 'folder 1' as 'a'.

Don't forget to preorder your Hatch green chili for this fall. Many vendors ship world-wide.


Report •

#6
August 11, 2014 at 12:34:29
Has nothing to do with OS version or file structure type. It has to do with the command interpreter. The quotes make it a string whereas without each is seen as a command and switches.

"c:\ folder 1" = string
c:\ folder 1 = command [move] unknown switches c:\folder, 1

Answers are only as good as the information you provide.
How to properly post a question:
Sorry no tech support via PM's


Report •

Ask Question