Vizion-Trading-EA/Shared Projects/VizionAI-Trading/cleanup-experts.ps1
2026-02-19 23:19:25 -06:00

16 lines
618 B
PowerShell

# cleanup-experts.ps1
# Removes all loose old EA files from Experts root, keeping only system folders.
$expertsRoot = "C:\Users\sahrk\AppData\Roaming\MetaQuotes\Terminal\FB9A56D617EDDDFE29EE54EBEFFE96C1\MQL5\Experts"
$keep = @("Advisors", "Examples", "Free Robots", "Shared Projects")
Get-ChildItem -Path $expertsRoot | Where-Object {
$keep -notcontains $_.Name
} | ForEach-Object {
Remove-Item -Path $_.FullName -Recurse -Force
Write-Host "Deleted: $($_.Name)"
}
Write-Host ""
Write-Host "Experts root now contains:"
Get-ChildItem $expertsRoot | Select-Object Name, Attributes | Format-Table -AutoSize