I'm trying to copy files from one directory on a server to another server without overwriting permissions at the destination but I'm working with an "interesting" setup:
Server A
Server B
I have a Jenkins process that will run when my fellow web developers commit changes to our repository. Jenkins then copies the files from the repository into it's workspace (located on the C: drive of the server). Once done downloading the files, I'm executing a command script that uses "ROBOCOPY" to copy the files from a directory in the Jenkins workspace to a network share (located on another server) that is pointed to the IIS web directory.
The ROBOCOPY script is as follows:
ROBOCOPY "C:\...\Jenkins\workspace\dev\app" "\\network-share-to-web-server\app" /mir /m /R:0 /W:1 /MT:8 /V /LOG:WhySkip.txt & if %errorlevel% leq 2 exit 0
Here's the problem: ROBOCOPY will only copy the directory structure and NOT the files within the directories which is all of our HTML/JavaScript/CSS/Images... AKA: The changes that we've done.
Any and all help would be greatly appreciated!
Try without /m (Copy only files with the Archive attribute and reset it)
As you want /MIR (Mirror), let Robocopy choose files to sync