Created
February 21, 2025 21:07
-
-
Save deyvicode/2b3eb149f0b38b40ca85c296d842f5e6 to your computer and use it in GitHub Desktop.
Convierte todos los archivos .txt en .txt utf-8 dentro de una carpeta
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| :: Obtener la ruta actual | |
| set "folderPath=%cd%" | |
| :: Ejecutar el script de PowerShell 7 | |
| pwsh -NoProfile -ExecutionPolicy Bypass -Command ^ | |
| "Get-ChildItem -Path '%folderPath%' -Filter *.txt | ForEach-Object { $filePath = $_.FullName; $content = Get-Content -Path $filePath; Set-Content -Path $filePath -Value $content -Encoding utf8 }" | |
| endlocal | |
| pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment