Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving entire folder and all its contents to another folder [duplicate]

Just need a batch script that will move one folder and all its contents into another folder.

Essentially this

C:\Folder1 to C:\Folder2\Folder 1

like image 824
user3108250 Avatar asked Dec 16 '13 17:12

user3108250


People also ask

How do I copy everything from one folder to another?

Right-click and pick Copy, or press Ctrl + C . Navigate to another folder, where you want to put the copy of the file. Click the menu button and pick Paste to finish copying the file, or press Ctrl + V . There will now be a copy of the file in the original folder and the other folder.

How can I copy the contents of a folder to another folder in a different directory using terminal?

In the Terminal app on your Mac, use the cp command to make a copy of a file. The -R flag causes cp to copy the folder and its contents. Note that the folder name does not end with a slash, which would change how cp copies the folder.


1 Answers

You can use windows native command:

MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2

You can use move /? call for more details.

So, in you case , the command would be:

move C:\Folder1 C:\Folder2\

If Folder2 doesn't exist, Folder1 will be renamed Folder2.

like image 90
mihai_mandis Avatar answered Oct 24 '22 07:10

mihai_mandis