amongst all the daily activities I have, there 2 that really takes a lot of time because I have to do it manually :(
I have 1 executable file, "myApp.exe" that needs to be copied (and overwrite existing one) to a second server:
from \\SERVER1\anyFolder\myApp.exe to \\SERVER2\anyFolder\myApp.exe Issue:
I am trying to do it automatically via CMD script using "runas" command but it is not working transparently because it ask me for password, eache time It connects to a different server (14th servers).
This one is done via RDP but I would like to do it via cmd if possible:
First step, connect to \\SERVER1\d$\ProductFolder
Second step, using Windows "Right click / Compress to zipped folder" compress to zip "ProductFolder"
Third, rename resulting zip file adding (manually) current date as a prefix, example of resulting file: "2017-05-05-Oracle.zip"
Fourth step, Move the resulting zip file to \\SERVER1\e$\Backup folder
If 3rd party is not an option for you, you can use powershell, assuming you have versions 3 or 4 with Net 4.5 (or greater). Or powershell 5, which has built-in zip commands.
On https://ss64.com/ps/zip.html, there is a powershell routine New-Zipfile that does this. I haven't tested this so can't confirm it.