![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Logic is failing me. Being an admin and not a programer (and it is early on a sunday morning *grin*), my logic is failing me. Hope someone can give me a kickstart. ![]() I have to csv's. I need to get a number from one and use it to lookup a value in another and write it back to the first or make a whole new list from the first... I.E.: list1.csv SerialNumber,IDNumber,CompName 12345,,machine1 12346,,machine2 12347,2223,machine3 list2.csv SerialNumber,IDNumber,User 12345,2221,user1 12346,2222,user2 12347,2223,user3 $list1 = import-csv .\list1.csv $list2 = import-csv .\list2.csv Then something along the line of: foreach ($list1.SerialNumber in $list2.SerialNumber) {$list1.IDNumber = $list2.idNumber) Of course that is not right, but I hope some can help. Thanks. JSimpson |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Logic is failing me. ipcsv .\list1.csv | % { $x = $_.SerialNumber $_.IDNumber = (ipcsv .\list2.csv | ? {$_.SerialNumber -eq $x}).IDNumber $_ } | epcsv newList.csv -not -- Kiron |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Logic is failing me. You rock Kiron! Thanks On Nov 2, 11:59*am, "Kiron" <Ki...@xxxxxx> wrote: Quote: > ipcsv .\list1.csv | % { > *$x = $_.SerialNumber > *$_.IDNumber = (ipcsv .\list2.csv | > * *? {$_.SerialNumber -eq $x}).IDNumber > *$_ > > } | epcsv newList.csv -not > > -- > Kiron |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Sign in logic | Live Mail | |||
| Logic One entry in registry | Vista General | |||
| Re: If and Elseif Conditional Logic | PowerShell | |||
| If and Elseif Conditional Logic | PowerShell | |||
| Logic 3 game controller | Vista Games | |||