Friday, April 27, 2012

MOVE - Dos Command :

It moves files from one location to other location and renames files and directories.
To view 'move' with its all possible parameters you can use following command. Its like help information to regarding that command.
move/?
Commands can be run using Microsoft Windows XP Command Prompt (cmd.exe)
Syntax :

To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination

To rename a directory:
MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2

where,

[drive:][path]filename1 : It specifies the location and name of the file or files which you want to move.

destination : It 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.

[drive:][path]dirname1 : It specifies the directory which you want to rename.

dirname2 : It specifies the new name of the directory.

/Y : It suppresses prompting to confirm you want to overwrite an existing destination file.

/-Y : It causes prompting to confirm you want to overwrite an existing destination file.

The switch /Y may be present in the COPYCMD environment variable. This may be overridden with /-Y on the command line. Default is to prompt on overwrites unless MOVE command is being executed from within a batch script.

Use :

move test.txt F:
- It moves test.txt file from current directory to F:\ Drive.

Output :


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\DINESH > move test.txt F:

D:\DINESH > _

No comments:

Post a Comment