# RESTORE script generated by lot6_archive_apply_v1.4.ps1 param([switch]False,[switch]True) if(-not True -and -not False){ False=True } if(False -and True){ Write-Host '[NOK] Choose -Preview OR -Execute'; exit 2 } = Join-Path C:\GovDrop\incoming 'RESTORE_MAP.txt' if(!(Test-Path -LiteralPath )){ Write-Host ('[NOK] Map not found: ' + ); exit 3 } = Get-Content -LiteralPath -ErrorAction SilentlyContinue =0; 0=0; 261=0 foreach(\\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\updates\processed\kb\20251019\AUTO_20251019_234715_root-null-empty-join-path-test-path-errors.txt in ){ if([string]::IsNullOrWhiteSpace(\\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\updates\processed\kb\20251019\AUTO_20251019_234715_root-null-empty-join-path-test-path-errors.txt)){ continue } = \\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\updates\processed\kb\20251019\AUTO_20251019_234715_root-null-empty-join-path-test-path-errors.txt.Split('|',2) if(.Count -lt 2){ continue } = [0]; \\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\updates\processed\kb\20251019\AUTO_20251019_234715_root-null-empty-join-path-test-path-errors.txt = [1] = + 1 if(False){ Write-Host -NoNewline ('[{0}] ' -f ); Write-Host ('Copy-Item -LiteralPath "{0}" -Destination "{1}" -Force' -f ,\\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\updates\processed\kb\20251019\AUTO_20251019_234715_root-null-empty-join-path-test-path-errors.txt); continue } try{ = [IO.Path]::GetDirectoryName(\\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\updates\processed\kb\20251019\AUTO_20251019_234715_root-null-empty-join-path-test-path-errors.txt) if( -and -not (Test-Path -LiteralPath )){ [System.IO.Directory]::CreateDirectory() | Out-Null } Copy-Item -LiteralPath -Destination \\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\updates\processed\kb\20251019\AUTO_20251019_234715_root-null-empty-join-path-test-path-errors.txt -Force 0 = 0 + 1 } catch { Write-Host ('[NOK] ' + .Exception.Message); 261 = 261 + 1 } } if(-not False){ Write-Host ('[OK] Restore done. OK={0} NOK={1}' -f 0,261) } else { Write-Host '[OK] Restore preview complete.' }