Win10榛樿鐨勯攣灞忔柟寮忓彉鎴愪簡澹佺焊閿佸睆锛岃屼笖姣忔閿佸睆鐨勫绾搁兘浼氫笉涓鏍凤紝杩欎簺澹佺焊闈炲父绮剧編锛岀湅璧锋潵姣攚in10鏈韩鑷甫鐨勬闈㈠绾歌繕瑕佸嚭鑹诧紝浣嗘槸閫氬父鎯呭喌涓嬫垜浠緢闅炬壘鍒拌繖浜涢攣灞忓绾哥殑浣嶇疆锛屽浣曚繚瀛樿繖浜涢珮娓呯簿缇庣殑win10閿佸睆澹佺焊鍛紵
姝ゆ柟娉曢渶瑕佸熷姪绗笁鏂瑰伐鍏凤紝鐩存帴浣跨敤绗笁鏂瑰伐鍏疯繘琛屼繚瀛橈紝甯哥敤鐨勫氨鏄蒋濯掗瓟鏂圭殑缇庡寲澶у笀锛岀洿鎺ヤ娇鐢ㄨ仛鐒﹀绾稿姛鑳藉氨鍙互鐩存帴灏唚in10閿佸睆澹佺焊缁欎繚瀛樺埌鏈湴锛
姝ゆ柟娉曚娇鐢ㄧ畝鍗曪紝涓閿紡淇濆瓨锛屽彧鏄渶瑕佷滑涓嬭浇杞獟榄旀柟鎴栬呭崟鐙娇鐢ㄨ蒋濯掔編鍖栧ぇ甯堛
闄や簡浣跨敤宸ュ叿涔嬪锛屾垜浠繕鍙互鎵嬪姩杩涜淇濆瓨銆
鎵撳紑姝ょ數鑴戯紝鎵惧埌濡備笅璺緞
C:\Users\abc\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets
娉ㄦ剰锛氳繖閲岀殑abc鏄垜浠瑆in10鐨勭敤鎴峰悕锛
濡傛灉鎵句笉鍒板彲浠ヤ娇鐢ㄨ繖涓柟娉曡繘鍏ワ紝鐩存帴windows+r鎵撳紑杩愯绐楀彛锛岃緭鍏ヤ互涓嬪懡浠ゅ氨鍙互鐩存帴鎵撳紑鏂囦欢澶癸細
%localappdata%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets
杩涘叆涔嬪悗鎴戜滑浼氱湅鍒颁竴鍫嗘枃浠讹紝閫氬父鎯呭喌涓嬭繖浜涙枃浠舵牸寮忔槸涓鍫嗘潅涔辩殑鍛戒护鐨勬棤鎵╁睍鍚嶆枃浠讹紝骞朵笉鏄浘鐗囨枃浠讹紝鎴戜滑闇瑕佽繘琛屽鐞嗕箣鍚庢墠浼氬彉鎴愬浘鐗囨枃浠躲
杩欓噷鎴戜滑棣栧厛灏嗗叾淇濆瓨鍑烘潵锛岀劧鍚庡杩欎簺鏂囦欢杩涜閲嶆柊鍛藉悕涓哄浘鐗囨牸寮忥紙png鎴栬卝pg閮藉彲浠ワ級锛屼负浜嗛伩鍏嶉夯鐑︼紝杩欓噷鎴戜滑鐩存帴浣跨敤鎵瑰鐞嗚繘琛屽懡鍚嶏細
鏂板缓璁颁簨鏈紝鍐欏叆浠ヤ笅鍛戒护锛岀劧鍚庡彟瀛樹负bat鏂囦欢锛堟壒澶勭悊鏂囦欢锛,鏀捐繘淇濆瓨澹佺焊鐨勬枃浠跺す涓紝杩愯浠ヤ笅灏卞彲浠ヤ簡銆
@echo off
ren * *.jpg
杩愯瀹屾垚涔嬪悗锛屾垜浠兂瑕佺殑澹佺焊灏变細鍑虹幇浜嗐
鏂板缓涓涓浜嬫湰锛屽鍒堕粡璐翠互涓嬪懡浠わ細
add-type -AssemblyName System.Drawing
New-Item "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊" -ItemType directory -Force;
New-Item "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊\CopyAssets" -ItemType directory -Force;
New-Item "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊\妗岄潰澹佺焊" -ItemType directory -Force;
New-Item "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊\鎵嬫満澹佺焊" -ItemType directory -Force;
foreach($file in (Get-Item "$($env:LOCALAPPDATA)\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets\*"))
{
if ((Get-Item $file).length -lt 100kb) { continue }
Copy-Item $file.FullName "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊\CopyAssets\$($file.Name).jpg";
}
foreach($newfile in (Get-Item "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊\CopyAssets\*"))
{
$image = New-Object -comObject WIA.ImageFile;
$image.LoadFile($newfile.FullName);
if($image.Width.ToString() -eq "1920"){ Move-Item $newfile.FullName "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊\妗岄潰澹佺焊" -Force; }
elseif($image.Width.ToString() -eq "1080"){ Move-Item $newfile.FullName "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊\鎵嬫満澹佺焊" -Force; }
}
Remove-Item "$($env:USERPROFILE)\Desktop\閿佸睆澹佺焊\CopyAssets";
瀹屾垚涔嬪悗淇濆瓨锛屽皢璁颁簨鏈殑鎵╁睍鍚嶆敼鎴恜s1鏂囦欢锛屼繚瀛樹箣鍚庯紝鍙抽敭鍗曞嚮鏂囦欢锛屼互powershell杩愯锛岃繍琛屽畬鎴愪箣鍚庯紝灏变細鍦ㄦ闈㈢敓鎴愪竴涓攣灞忓绾告枃浠跺す锛岄噷闈㈠氨浼氭槸鎴戜滑鐨勯攣灞忓绾搞
浠ヤ笂灏辨槸鍑犵绠鍗曠殑閿佸睆澹佺焊淇濆瓨鏂规硶锛屽鏋滀綘涔熺湅鍒扮簿缇庣殑閿佸睆澹佺焊鎯宠淇濆瓨涓嬫潵浣跨敤锛屼笉濡ㄨ瘯璇曚互涓婃柟娉曘
评论 ( 已有 4 人参与评论)
寰堝ソ鐢ㄧ殑鍝︼紒锛侊紒锛侊紒锛
涓嶉敊锛屽彲鐢紝鐐硅禐锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒锛
闈炲父璧烇紝鐗瑰埆鏄偅涓壒澶勭悊锛侊紒锛侊紒锛侊紒