Merge branch 'main' of http://192.168.86.64:3000/Raincloud/ProjectStructure_HOME
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
# Update subfolders with the latest UpdateSequences and UpdateAllSequences scripts
|
||||
|
||||
$sourceBat = "A:\1 Amazon_Active_Projects\3 ProjectStructure\UpdateSequences.bat"
|
||||
@@ -65,4 +66,61 @@ if ($grandFailed -eq 0) {
|
||||
Write-Host "`nAll files updated successfully." -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "`nSome updates failed. See errors above." -ForegroundColor Yellow
|
||||
=======
|
||||
# Copy the current UpdateSequences.bat to all subfolders that have it
|
||||
|
||||
$sourceFile = "R:\Creative\artsy\maya\0 ProjectStructure\UpdateSequences.bat"
|
||||
|
||||
if (-not (Test-Path $sourceFile)) {
|
||||
Write-Error "Source file not found: $sourceFile"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
Write-Host "=== Updating UpdateSequences.bat files ===" -ForegroundColor Cyan
|
||||
Write-Host "Source .bat: $sourceFile" -ForegroundColor White
|
||||
Write-Host ""
|
||||
|
||||
# Find all UpdateSequences.bat files
|
||||
$targetFiles = Get-ChildItem -Path "R:\Creative\artsy\maya" -Recurse -Filter "UpdateSequences.bat" | Where-Object { $_.FullName -ne $sourceFile }
|
||||
|
||||
Write-Host "Found $($targetFiles.Count) target files to update:" -ForegroundColor Yellow
|
||||
foreach ($file in $targetFiles) {
|
||||
Write-Host " - $($file.FullName)" -ForegroundColor Gray
|
||||
}
|
||||
Write-Host ""
|
||||
|
||||
$updatedCount = 0
|
||||
$failedCount = 0
|
||||
|
||||
foreach ($targetFile in $targetFiles) {
|
||||
$targetDir = $targetFile.Directory.FullName
|
||||
$targetBat = Join-Path $targetDir "UpdateSequences.bat"
|
||||
|
||||
try {
|
||||
# Copy the .bat file
|
||||
Copy-Item -Path $sourceFile -Destination $targetBat -Force
|
||||
Write-Host "✓ Updated: $targetBat" -ForegroundColor Green
|
||||
|
||||
$updatedCount++
|
||||
}
|
||||
catch {
|
||||
Write-Host "✗ Failed to update: $targetBat" -ForegroundColor Red
|
||||
Write-Host " Error: $($_.Exception.Message)" -ForegroundColor Red
|
||||
$failedCount++
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=== SUMMARY ===" -ForegroundColor Magenta
|
||||
Write-Host "Successfully updated: $updatedCount" -ForegroundColor Green
|
||||
Write-Host "Failed updates: $failedCount" -ForegroundColor Red
|
||||
Write-Host "Total targets: $($targetFiles.Count)" -ForegroundColor White
|
||||
|
||||
if ($failedCount -eq 0) {
|
||||
Write-Host "`n🎉 All UpdateSequences.bat files have been successfully updated!" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "`n⚠️ Some files failed to update. Check the errors above." -ForegroundColor Yellow
|
||||
>>>>>>> d89d8e0cf215637d0ffabf165877815ab4203f37
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user