Windows – Moving multiple files via command line to one folder/directory (Windows 7)

command linewindows 7

C:\Users\Moondra>move "WebScraping with Python projects.ipynb", Untitled2.ipynb "Scraping projects"

I'm trying to move the first two files ("WebScraping with Python projects.ipynb", Untitled2.ipynb) to the folder "Scraping projects". I can move one file to the folder at a time, but I can't seem to move both via one command.

I keep getting
The syntax of the command is incorrect. even if I remove the comma in between the two files.

Best Answer

I can move one file to the folder at a time, but I can't seem to move both

I keep getting The syntax of the command is incorrect. even if I remove the comma in between the two files.

The source must be a single file, a directory, or a wildcard expression. None of these apply in your case, where you are specifying two files.

The syntax of the move command is:

Syntax

MOVE [options] [Source] [Target]

Key

source : The path and filename of the file(s) to move.

target : The path and filename to move file(s) to.

options:
    /Y    Suppress confirmation prompt, when overwriting files.
    /-Y   Enable confirmation prompt, when overwriting files.

Both Source and Target can be either a folder or a single file.

The source can include wildcards (but not the destination).

Source move

Assuming that your source directory contains only the 2 ipynb listed in the question you can use the following command:

move *.ipynb "Scraping projects"

Further Reading

Related Question