asked on
'Read all the file names and remove directory part and store in array
Dim allFiles As String() = File.ReadAllLines("C:\Working Directory\All.txt") _
.Select(Function(f) Path.GetFileName(f)).ToArray()
Dim OtherFiles As String() = File.ReadAllLines("C:\Working Directory\Other.txt") _
.Select(Function(f) Path.GetFileName(f)).ToArray()
' And array of all files in All.txt that are NOT in Other.txt
Dim allNotInOthers As String() = allFiles.Except(OtherFiles).ToArray()
' And array of all files in Other.txt that are NOT in All.txt
Dim otherNotInAll As String() = OtherFiles.Except(allFiles).ToArray()
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
Open both files
var line=ReadLineFromFile1
while(not eof)
add stripped file name to Firstlist<string>
line = ReadLineFromFile2
while(not eof)
if stripped file is in list, remove from Firstlist
else add to Secondlist<string>
Close both files
now, all of the files in Firstlist are in the first file, but not the second one
and, all of the files in Secondlist are in the second file, not the first
if you need help on any specific part of that, feel free to post here or ask a new question. It is all very easily Googled.