Microsoft
Software
Hardware
Network
Question : PowerShell string += question
Ok, so this is probably a simple one, but I have been staring at it for too long.
I am comparing 2 text files and want to put the differences into a string, This works fine, but leaves me with a pesky blank line at the end.
Compare-Object (GC .\remote.txt) (GC .\complete.txt) | %{$strFilesToDownload += "$($_.InputObject)`n"}
Is there a way to avoid this without parsing out the new line after this? For an array I would typically check if it was the last item, but this is not the case here. Thank you for any information / hints.
Answer : PowerShell string += question
One quick way would be to use something like this:
SELECT * FROM mytable WHERE PATINDEX('%[^[ a-z0-9!@#$%^&*()-_=+]%' ,myfield) > 0
You might have to add more characters to this, but this is just a quick example.
Random Solutions
Video Chat Capabilities
How to separate multiple email accounts into different data files in Outlook 2010
Windows Server 2008 R2 iSCSI Initiator and HP D2D CHAP issue
KMS Activation Multiple Keys
Move Mailbox Powershell Script (sending Welcome e-mail HTML format)
cannot reset Fortinet fortiWIFI 80C to factory settings
how do I select a list of records that exist multiple times only once in a table
WCF Problem: The private key is not present in the X.509 certificate.
how to fix outlook error
How do I use a static page for Joomla's Home Page?