lesnocenter.blogg.se

Copy one file to multiple folders
Copy one file to multiple folders










copy one file to multiple folders

  • Retaining File Owner and ACL Information.
  • Copying Files Based on the Archive Attribute.
  • Excluding Files and Folders from the Copy.
  • Preserving the Read-Only File Attribute.
  • Copying All Files and Folders Recursively.
  • As Command Prompt appears in search results, right click on it and click on “Run As Administrator”.Ĭhange the command prompt command as the following: off for /D %a in ("C:\Users\wayto\Desktop\Destination Folder\*.*") do xcopy /y /d C:\Users\wayto\Desktop\Source\text. If you want, instead of using the batch file, you can edit the text and use it directly as commands on Command prompt.

    copy one file to multiple folders

    Replace the file.FileExt by the text.txt file, which is my test off for /D %%a in ("path-to-folder\*.*") do xcopy /y /d path-to-file\file.FileExt off for /D %%a in ("Ĭ:\Users\wayto\Desktop\Destination Folder\*.*") do xcopy /y /dĬ:\Users\wayto\Desktop\Source\text.FileExt "%%a\" So, replace path-to-folder by the path to the Destination Folder. Within, the destination folder, there are three more sub folders namely, destination 1, destination 2 and destination 3 respectively. I have created a folder name Destination Folder. I have created a test file that I want to copy.

    copy one file to multiple folders

    You will need to make edits to this script before you can save it. On the above script, you have to make some edits. Save the script in BAT file format and run it. For that, open Notepad and paste the following text in off for /D %%a in ("path-to-folder\*.*") do xcopy /y /d path-to-file\file.FileExt "%%a\"

    copy one file to multiple folders

    So, to begin with, you have to create a batch script. So, if the folders are in different locations, then you have to bring them under one common folder, which ultimately nullifies the effect of time saving. For example, if the folders, where you want to copy the file are in different locations, or drives, then the process won’t work for you. Before we show the steps, we must admit that this is just an alternative to save your time, but it lacks flexibility and has a lot of restrictions. In Windows 10, there is an alternate way by which you can copy a file to multiple folders without consuming much time. You can easily perform it by drag and drop method or copying the file first and then pasting it on all the folders of your system. Copying a file to multiple locations or folders is not a big deal.












    Copy one file to multiple folders