ps 3.0+- $url='http://www.bathome.net/thread-52268-1-1.html';
- if(!(test-path $env:appdata\1 -type Container)){mkdir "$env:appdata\1"};
- iwr -uri $url -outfile "$env:appdata\1\url.log";
- $title = (gc "$env:appdata\1\url.log") -match '<title>' -replace '</?title>|-\s*BAT求助.*'
- if(test-path "$env:appdata\1\1.txt"){if($title -ne (gc "$env:appdata\1\1.txt")){'标题改动'}else{'标题相同'}}else{$title|sc "$env:appdata\1\1.txt";'无内容'}
- del "$env:appdata\1\url.log" -force;
- pause
复制代码
|