Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move folder from one directory to another in batch script

Can anyone please tell me how to move a folder from one path to another path using batch script?

For example, I want to move XXX folder (including the contents) from D:\abc\XXX folder to D:\cef\.

like image 876
orbit Avatar asked Aug 12 '10 18:08

orbit


People also ask

How do I move files from one directory to another in command prompt?

To move one or more files: MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination To rename a directory: MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2 [drive:][path]filename1 Specifies the location and name of the file or files you want to move. destination Specifies the new location of the file.

How do I move a folder from one location to another?

You can move a file or folder from one folder to another by dragging it from its current location and dropping it into the destination folder, just as you would with a file on your desktop. Folder Tree: Right-click the file or folder you want, and from the menu that displays click Move or Copy.

How do I move files from one folder to another in script?

You can automatically move files from one folder to another by using a script that uses Robocopy, a command-line utility which comes with Windows 10. To automated file transfer, you need to use Robocopy script, add frequency in days, source and destination folder paths.

What is %% A in batch script?

Use double percent signs ( %% ) to carry out the for command within a batch file. Variables are case sensitive, and they must be represented with an alphabetical value such as %a, %b, or %c. ( <set> ) Required. Specifies one or more files, directories, or text strings, or a range of values on which to run the command.


1 Answers

How about the plain old-fashioned:

move d:\abc\XXX d:\cef\XXX
like image 101
Carl Norum Avatar answered Sep 23 '22 07:09

Carl Norum