Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
Compare and update file contents in folders (source,target)
TAN WhoAMI
Dec 22 2014 10:20 PM
935
Reply
I have 2 directories (source, target) which contain multiple files with the same filenames, e.g 001.txt, 002.txt, 003.txt... and so on
for example on the source directory with this 001.txt file
[ZERO_POINT_004]
X=0.000000
Y=52000.000000
Z=50827.000000
ZD=38530.000000
[ZERO_POINT_005]
X=-38000.000000
Y=52000.000000
Z=50827.000000
ZD=38530.000000
[ZERO_POINT_006]
X=-76000.000000
Y=52000.000000
Z=50827.000000
ZD=38530.000000
[ZERO_POINT_LEFT_001]
X=0.000000
Y=0.000000
Z=50827.000000
ZD=38530.000000
[ZERO_POINT_LEFT_002]
X=-38000.000000
Y=0.000000
Z=50827.000000
ZD=38530.000000
[ZERO_POINT_LEFT_003]
X=-76000.000000
Y=0.000000
Z=50827.000000
ZD=38530.000000
and on the target directory with this 001.txt file
[ZERO_POINT_004]
X=0.000000
Y=52000.000000
Z=50827.000000
ZD=38530.000000
[ZERO_POINT_005]
X=-38000.000000
Y=52000.000000
Z=50827.000000
ZD=38530.000000
[ZERO_POINT_006]
X=-76000.000000
Y=52000.000000
Z=50827.000000
ZD=38530.000000
Notice that the file in the target directory contain information similar to that from the source directory, but less those highlighted in red. How do I copy the contents difference (in Red color) to the file in the target directory? The contents difference copied over must be on the same lines as what the file in the source directory.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Display image in Datagrid row from file system in LightSwitc
Error coming when i am runing my web app on iis 7