I have the following script that should be running from a cmd script:
powershell -command "(Get-Content %baseKitPathFile%) | ForEach-Object { $_ -replace 'Latest', '%version%' } | Set-Content %baseKitPathFile%"
The script is working fine and replacing the content of Latest
to a version
variable however it also adds carriage return after the end of the file
How can I search replace a text file content without the extra carriage return
maybe be trying to use [io.file]:
The most important is that if should be running from cmd script