문제

I need to modify the property string in KML/KMZ file, I have unzip the KMZ file to the temp folder and need to go through the KML file to change the name string, (all the name string when it apprears) so powershell could help, but I am not quite sure how, I am a newbie in powershell. how could I do this? please help!

도움이 되었습니까?

해결책

Without a sample this example isn't accurate but you have to do something like this:

(get-content c:\temp\yourfile.kml ) | % {  $_ -replace 'name','anothername' } | 
set-content c:\temp\yourfile.kml

This change ANY 'name' string with 'anothername' string:

myname it's my name  

become

myanothername it's my anothername
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top