For moving files, Batch Script provides the MOVE command.
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
Following are the description of the options which can be presented to the DEL command.
|S.No.||Options & Description|
Specifies the location and name of the file or files you want to move
Specifies the new location of the file. Destination can consist of a drive letter and colon, a directory name, or a combination. If you are moving only one file, you can also include a filename if you want to rename the file when you move it.
Specifies the directory you want to rename.
Specifies the new name of the directory.
Suppresses prompting to confirm you want to overwrite an existing destination file.
Causes prompting to confirm you want to overwrite an existing destination file.
Let’s look at some examples of renaming files.
move c:\windows\temp\*.* c:\temp
The above command will move the files of c:\windows\temp to the temp directory in root.
move new.txt, test.txt c:\example
The above command will move the files new.txt and test.txt into the c:\example folder.