im wanting to remote into one computer and share a drive on it and then copy files to the other computer all locally on the remote system . this will make file distripution faster instead of having to send to all computers. I can just send it to one computer and let it copy to the others locally.
@echo off setlocal EnableDelayedExpansion set /p "ip_address=Enter IP address:" set /p "target=Enter computer Manager(2),Training(3):" for /f %%a in ("%ip_address%") do ( for /F "tokens=1,2,3 delims=." %%i in ("%%a") do ( set other_ip=%%i.%%j.%%k.%target% ) echo !other_ip! is the Target computer psexec -u administrator -p twash01 \\%%a -i cmd /s /c net use z: "\\!other_ip!\c$" "password" /user:administrator psexec \\%%a -u administrator -p twash01 copy c:\source\team*.reg z:\temp -y psexec \\%%a -u administrator -p twash01 cmd.exe /c net use z: /delete )
From novice to tech pro — start learning today.