I have this following code
$filenameFormat1 = "new_permission.txt"
$approvedLogsName = "last_permissions.txt"
Compare-Object -referenceobject $(get-content "E:\\logs\$approvedLogsName") -differenceobject $(get-content "E:\\logs\$filenameFormat1")…
I need to compare 2 CSV files, and output the differences contained in the larger one, that are not present in smaller one based on 2 headers (SiteName, PrimarySMTPAddress).
At present, i can do this using the below:
#Importing CSV
$File1 =…
I compare files inside a folder. In this folder some files are existing in two file formats (filename1.jpg, filename1.bmp, ...) and some files are only existing in one format.
I try to find all files which are only existing in .bmp format and…
I'm trying to check if the Shape selected by user is the proper one. For the simplicity, let's say we have only one shape in otherwise empty worksheet. Because of that, we know that the selected shape must be the right one:
Sub AreShapesTheSame()
…
Thank you for reading my post and your advice :)
The scenario is, that I have an HD built in my desktop where I collected files for many years. So one day I did a backup to an external HD, which I then took travelling and kept on collecting photos…
I have 2 arrays and would like to compare it on powershell.
I'm using Compare-Object for that but, sometimes the comparison process are not correct.
if one of the array have a record which doesn't exist on the other, the diff are…
I have a PowerShell script that compares yesterday's and today's file to provide the changes that can be further loaded into an Oracle table for reporting needs. My trouble is that over the weekends when there is no change in the source system,…
I want to compare 2 text files and output the difference in another text file.
compare-object (get-content c:\temp\hostname_old.txt) (get-content c:\temp\hostname_new.txt) | Select-Object -ExpandProperty InputObject | Out-File…
I have two files being compared, one a CSV and one a txt file. The CSV file has the information for around 5,000 servers and the txt file has only server names for around 3,000. The columns within the CSV are Name, OS, and Type. This is what I did…
I am trying to compare two folders at the hash level.
I get the hash information; Algorithm, Hash, Path
$SourceDocs and $DestDocs both have the Algorithm, Hash, Path
When I run Compare-Object, the only value that gets passed along is SideIndicator
I…
I want to compare two objects and get only the different values. I have this code:
$a = ("this is blah blah DOG")
$b = ("Dit is blah BLAH dog")
Compare-Object -ReferenceObject $a -DifferenceObject $b
with the above code I get the following…
I have two spreadsheets with data which I want to compare to highlight matching and non-matching data with a few "gotchas" - some columns I want to ignore for comparison (score, testname), others I want to include (Filename and hash), and I want to…
I am attempting to use Compare-Object to find elements that are in one array ($fileArray) but not in another ($dictionaryArray). For some reason, Compare-Object is only comparing the last two elements in fileArray. Here is the code I am trying to…
I try to merge to files with Compare-Object and I got a file like this:
Number=5
Example=4
Track=1000
Date=07/08/2018 19:51:16
MatCaissierePDAAssoc=
NomImpPDAAssoc=
TpeForceLectPan=0
Number=1
Example=1
Track=0
Date=01/01/1999
You can see it repeats…
I receive a fixed format file out of a legacy application that is loaded to an oracle table by SQL loader daily. A new requirement needs Day 1 and Day 2 files to be compared and only the difference to be appended, so the data at the end of day 2…