Skip to content

Instantly share code, notes, and snippets.

@imAliAsad
Created December 26, 2017 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imAliAsad/3e2bf896d51b237f3eee51498e4b39ef to your computer and use it in GitHub Desktop.
Save imAliAsad/3e2bf896d51b237f3eee51498e4b39ef to your computer and use it in GitHub Desktop.
Copy files to multiple computers in a network by using a batchfile
:: Usage
:: This batch file code is used to copy the files from one computer to all other computers with in a network
:: Make sure you'll have the access to that computer where you wish to copy the file.
:: How to use it
:: Put all the files on the same folder where this batch file is located
:: Put the target.txt file on the same folder where the same batch file is located.
:: target.txt file should contain the target folder address in this format
:: "\\LAE20039\C$\Users\Ali asad\AppData\Roaming\Autodesk\Revit\Addins\2017\"
:: where LAE20039 is the PC name that you can read by clicking the properties of my computer.
:: Save the batch file with .bat extenstion and run it.
@echo off
echo --------------------
for /f "tokens=*" %%a in ('type targets.txt') do (
echo Target Computer: %%a
:: write the file names you wish to copy
xcopy /Y "%CD%\RevitDMS.dll" %%a
xcopy /Y "%CD%\RevitDMS.addin" %%a
echo --------------------
)
pause
:: For more information
:: imaliasad@outlook.com
:: instagram: imaliasad
:: facebook: imaliasad
:: twitter: imaliasad
"\\LAE20039\C$\Users\Ali asad\AppData\Roaming\Autodesk\Revit\Addins\2017\"
"\\LAE20039\C$\Users\Ali asad\AppData\Roaming\Autodesk\Revit\Addins\2017\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment