Hi,
I want to compare latest two files and get output to another file to different folder, here is an exmple...
Folder1 has lot of files with different names with timestamps...
Indvalue_06_14_2013_1944.txt
Indvalue_06_15_2013_1944.txt
Indvalue_06_16_2013_1944.txt
Indvalue_06_17_2013_1144.txt
Indvalue_06_17_2013_1944.txt
Indvalue_06_17_2013_2044.txt
GrtValue_06_14_2013_1944.txt
GrtValue_06_15_2013_1944.txt
GrtValue_06_16_2013_1944.txt
GrtValue_06_17_2013_1944.txt
GrtValue_06_17_2013_2044.txt
NRValue_06_15_2013_1944.txt
NRValue_06_16_2013_1944.txt
Now, i have to take latest two files (which starts with "IndValue") and compare the latest two files and get output file to another folder.
Expected output folder 2:
Indvalue_06_17_2013_1944.txt
Indvalue_06_17_2013_2044.txt - these files should compare now...
Compare the above 2 files and get output in to Folder3.
Indvalue_06_17_2013_1944.txt contains like below...
1|Jan|Ind|Accont1|1000.34
2|Jan|Ind|Accont2|1000.34
3|Jan|Ind|Accont3|1000.34
Indvalue_06_17_2013_2044.txt contains like below...
1|Jan|Ind|Accont|1000.34
2|Jan|Ind|Accont2|1000.34
3|Jan|Ind|Accont3|1000.34
4|Jan|Ind|Accont4|1000.34
5|Jan|Ind|Accont5|100
6|Jan|Ind|Accont6|14560.34
7|Jan|Ind|Accont6
Comparision output should be like below...(compare file1 with file2, wtever extra records in file2 should get result in 3rd file)
4|Jan|Ind|Accont4|1000.34
5|Jan|Ind|Accont5|100
6|Jan|Ind|Accont6|14560.34
7|Jan|Ind|Accont6
Please help on this to write in VB.
Bookmarks