Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename folders in Windows 7: command line that have spaces in the name [closed]

Tags:

cmd

windows-7

How do I rename a path that has spaces in it under Windows 7?

Command line:

rename c:\ho hum\new folder  ->  c:\ho_hum\new_folder
like image 875
jdl Avatar asked Apr 12 '13 15:04

jdl


People also ask

How do I rename a folder with spaces?

In the Windows command line, any file or directory containing a space must be surrounded with quotation marks for it to be recognized. For example, if you wanted to rename the file "stats baseball.

How do you handle spaces in CMD?

In the Command Prompt, the caret character ( ^ ) will let you escape spaces—in theory. Just add it before each space in the file name. (You'll find this character in the number row on your keyboard.

How do I rename a directory in command prompt?

Windows CMD Rename Folder To rename a folder in the command line, type the following command: ren Folder NewFolderName. Note: We can also use ren (the short form of rename) for rename operations. Both Ren and Rename refer to the same command.


1 Answers

This can only be done by moving the folder and set a new name for the destination:

move "c:\ho hum\new folder" "c:\ho hum\new_folder"
move "c:\ho hum" "c:\ho_hum"
like image 136
Maria Ioannidou Avatar answered Nov 13 '22 04:11

Maria Ioannidou