Hi Expert,
I am stuck with my script. It gives me no error but i am not getting desired output.
I have two files text file or csv file. It depends upon me which file i required i have both option my data is in string value and single column only so, it can be text or csv whichever is required. I have to compare the file each line with another file. No matter data is located on which line. It will have to compare every line every time. I tried many times but i am not getting desired output. I tried to compare it as text or csv but all the times it is not giving me output as require.
Here is my code :(
$csv2 = "C:\Users\Desktop\Log\Threat_report.01232014195755.txt"
$csv1 = "C:\Users\Desktop\Log\Threat_report.txt"
Compare-Object -ReferenceObject (get-content -path $csv1) -DifferenceObject (get-content -path $csv2)| export-csv "C:\Users\Desktop\Log\Threat_Report.csv" -NoTypeInfo
sample data File 1
| - File ONTAP_ADMIN$\vol\ABCDEF\Groupdata$\Central_Resource_Publish\Temp data Menu\~$temp aResource Menu.xlsm |
| ONTAP_ADMIN$\vol\ABCDEF\Groupdata$\Central_Resource_Publish\Temp data Menu\~$temp Nomenu Menu.xlsm |
ONTAP_ADMIN$\vol\ABCDEF\Groupdata$\Central_Resource_Publish\Temp data Menu\~$temp aResouserce Menu.xlsm
ONTAP_ADMIN$\vol\ABCDEF\Groupdata$\Central_Resource_Publish\Temp data Menu\~$temp Rsfsesource Menu.xlsm
|