Windows

How to copy a file to multiple folders in one go in Windows 10?

How to copy a file to multiple folders in one go in Windows 10?

Sometimes we have several folders and each one has a very large subfolder structure. In this case, copying a given file to all directories could take hours. Therefore, it is necessary to automate the process so that a simultaneous action is taken to achieve an effective result.

Here we explain everything you need to know about files and folders and a simple procedure to copy a file to multiple folders at once in Windows 10.

Windows 10 Wall

What is a file in Windows?

A file or file is an element that contains a collection of information. On a computer, files are viewed as documents, whether they are spreadsheets, images, texts, slides, songs, videos, among others.

Windows uses icons to represent these documents according to their extension. The extension of a file is very useful because it allows us to define its function. In this regard, Windows uses the operator (.) Followed by the extension, for example, .docx to reference the document in question.

What is a folder in Windows?

A folder, also called a directory, is a virtual location or container that stores any type of files and other folders that are commonly known as subdirectories.

Windows allows you to create a folder structure that can be organized according to the needs of users, a process that can be done in a conventional way, but at the same time, directories can also be created from CMD .

The folders can be found anywhere in the operating system and can be accessed through the so-called Windows Explorer. There are system folders and user folders. The former house the essential Windows files, while the latter store files for text documents, music, videos and images.

Copy a file to multiple folders

Procedure to copy a file to multiple folders at once in Windows 10

It is possible to copy a file to multiple folders by pressing the Ctrl key while dragging each file. However, if you have many folders, the process can be long and tedious. For this reason, it is convenient to create a batch file or script to execute the action in an automated way.

To achieve this, it is necessary that the folders where we are going to copy the file are in the same location on the disk, therefore, it will be necessary to copy the full path of the folder , otherwise, the batch script will not be able to be executed correctly .

Create a batch file

To create a batch file you must open the notepad and write the following commands, note that each point represents a line in the file:

  • @echo off
  • for / D %% a in (“PATH-OF-THE-FOLDERS \ *. *”) do xcopy / y / d ROUTE-FOLDER \
  • FILE.EXTENSION “%% a \”

Leave a Reply

Your email address will not be published.

Back to top button