I have 3 folders on Windows system:
S - Source code folder.
A - Application server folder.
B - Backup folder.
I am able to copy all modified/new files from S to A by using Ant copy
command.
My requirement is before copying/overwriting files S to A, I have to take backup of all files from A to B.
I.e. I want to copy those files from A to B which will get updated from S to A
In simple terms taking backup of production system folder before uploading new code.
Copying from A to B is not the problem, the problem is to get the list of files by comparing S & A and then copy them from A to B Suppose I have 3 files in on S & A which are in sync One.txt
, Two.txt
, Three.txt
. Now the developer only changed Three.txt
So I will have to copy Three.txt
from S to A, but before overriding file on A, I want to take the back of Three.txt
by copying it from A to B.