Situatie
The move is an internal command found in the Windows Command Interpreter (cmd) that is used to move files and folders/directories. The command is robust than a regular move operation, as it allows for pattern matching via the inclusion of Wildcards in the source path.
The command is a very generic one and is available (in one form or the other) in almost every single operating system out there (under different aliases).
Solutie
Pasi de urmat
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. The 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 –
Specifies the directory you want to rename.
dirname2 –
Specifies the new name of the directory.
/Y –
Suppresses prompting to confirm you want to overwrite an existing destination file.
/Y –
Causes prompting to confirm you want to overwrite an existing destination file.
Using the Command:
Throughout this section, we would take the following directory as example for demonstrating the usage of move command.
Moving a File from One Folder to Another :
move source_path destination_path
- source_path –
It is the path of the file which we are willing to move, and the destination_path is the location to which we want the file to be moved.
- The Dir /b command is used to list all the files and folders inside a directory.
- In the above example, we have moved an extension-less file named salute from C:\suga to C:\suga\apples directory.
Moving Multiple Files from One Path to Another :
move source_path destination_path
- source_path –
It is a path containing wildcards that will allow more than one file to be taken as a source. The destination_path is now a path to a directory where the moved files would reside (should not contain wildcards).
Leave A Comment?