Good Morning Guys! kind of new to powershell and trying to make my life a bit easier with it :)
im using powershell to change date from a text file. For now i have the (Get-content) -replace (Out-file) and that works perfectly. This is what the text data looks like ABC;;1;8888;;;11,00;;;413; ABB;;1;7777;;;1,56;;;414; AAA;;1;6666;;;60,00;;;412; BBB;;1;5555;;;7,30;;;412; CCC;;1;4444;;;19,00;;;412; DDD;;1;3333;;;1,48;;;412; EEE;;1;1222;;;46,25;;;416; FFF;;1;1111;;;9,00;;;416; KKK;;1;1234;;;45,11;;;413; but I have been trying to get it to change (IF) for example: If ABC has 8888 then 8888 should be change to 1234 >From this: ABC;;1;8888;;;11,00;;;413; to this: ABC;;1;1234;;;11,00;;;413; and the rest of the data should stay the same, and it should check line for line. Is that even possible? 2nd thing i was trying to do is have the data from a secound text file be put at the first place of a diferent text file. for example File A: 12345;abcde;04/2022 File B: ABC;;1;8888;;;11,00;;;413; ABB;;1;7777;;;1,56;;;414; AAA;;1;6666;;;60,00;;;412; BBB;;1;5555;;;7,30;;;412; CCC;;1;4444;;;19,00;;;412; DDD;;1;3333;;;1,48;;;412; EEE;;1;1222;;;46,25;;;416; FFF;;1;1111;;;9,00;;;416; KKK;;1;1234;;;45,11;;;413; and I would like file B to end as 12345;abcde;04/2022 ABC;;1;8888;;;11,00;;;413; ABB;;1;7777;;;1,56;;;414; AAA;;1;6666;;;60,00;;;412; BBB;;1;5555;;;7,30;;;412; CCC;;1;4444;;;19,00;;;412; DDD;;1;3333;;;1,48;;;412; EEE;;1;1222;;;46,25;;;416; FFF;;1;1111;;;9,00;;;416; KKK;;1;1234;;;45,11;;;413; is that possible? Thank you very much for any tips or help you can give me Have a great weekend guys Regards Smonk :) -- <https://forum.pspad.com/read.php?2,77278,77278> PSPad freeware editor https://www.pspad.com