Forrest logo
back to the robocopy tool

robocopy:tldr:9bf60

robocopy: Copy all `.jpg` and `.bmp` files from one directory to another.
$ robocopy ${path\to\source_directory} ${path\to\destination_directory} ${*-jpg} ${*-bmp}
try on your machine

The given command is using the "robocopy" command, which is a built-in Windows utility used for copying files and directories. The command is structured as follows:

robocopy - This is the command itself, which starts the robocopy utility.

${path\to\source_directory} - This is the source directory from where the files will be copied. You should replace ${path\to\source_directory} with the actual path to the source directory you want to copy files from.

${path\to\destination_directory} - This is the destination directory where the files will be copied. You should replace ${path\to\destination_directory} with the actual path to the destination directory you want to copy files to.

${*-jpg} - This is a filter parameter used to specify files that have names ending with "-jpg". The asterisk (*) acts as a wildcard, representing any characters in the file name before "-jpg".

${*-bmp} - This is another filter parameter used to specify files that have names ending with "-bmp". Again, the asterisk (*) acts as a wildcard, representing any characters in the file name before "-bmp".

The robocopy command, with the specified source and destination directories and the filter parameters, will copy files from the source directory to the destination directory, but only those files whose names end with "-jpg" or "-bmp". This allows you to selectively copy specific types of files based on their names.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the robocopy tool