Files
Wx_BLWConfigTools_V02_Prod/tools/move_unused_images.ps1

52 lines
2.4 KiB
PowerShell

$root = 'E:\ForkSync\Wx_BLWConfigTools_V02_Prod'
$backup = Join-Path $root 'trash_images_backup'
if (-not (Test-Path $backup)) { New-Item -Path $backup -ItemType Directory | Out-Null }
$files = @(
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\icon\vacant.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\icon\住宿.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\icon\开门.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\icon\设备编号.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\icon\退房.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\icon\酒店.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\icon\重启.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\BasicsBg.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\cjkz.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\componentBg.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\logo.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\share.jpg',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\tabbar\about.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\tabbar\about_cur.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\tabbar\basics.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\tabbar\basics_cur.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\tabbar\component.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\tabbar\component_cur.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\tabbar\plugin.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\tabbar\plugin_cur.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\wave.gif',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\images\zanCode.jpg',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\back.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\ble.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\ecble.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\logo.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\s1.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\s2.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\s3.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\s4.png',
'E:\ForkSync\Wx_BLWConfigTools_V02_Prod\img\s5.png'
)
$moved = @()
foreach ($f in $files) {
if (Test-Path -Path $f) {
try {
Move-Item -Path $f -Destination $backup -Force
$moved += $f
} catch {
Write-Error "Failed to move $f : $_"
}
}
}
Write-Output "Moved files:`n"
$moved
Write-Output "`nBackup dir contents:`n"
Get-ChildItem -Path $backup -Recurse | ForEach-Object { $_.FullName }