remove .bat
This commit is contained in:
41
replace.bat
41
replace.bat
@@ -1,41 +0,0 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set "vmix_file=%~1"
|
||||
if "%vmix_file%"=="" (
|
||||
echo Usage: %0 filename.vmix
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%vmix_file%" (
|
||||
echo File "%vmix_file%" not found!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set "replace=https://per.tvstart.ru"
|
||||
set "temp_file=%vmix_file%.tmp"
|
||||
|
||||
echo Processing: %vmix_file%
|
||||
|
||||
powershell -Command "
|
||||
$content = Get-Content '%vmix_file%' -Raw
|
||||
$pattern = 'https?:\/\/\d*\.\d*\.\d*\.\d*:\d*|https?:\/\/\w*\.\w*\.\w*'
|
||||
$replacement = '%replace%'
|
||||
$result = $content -replace $pattern, $replacement
|
||||
$result | Out-File '%temp_file%' -Encoding UTF8
|
||||
"
|
||||
|
||||
if exist "%temp_file%" (
|
||||
move /y "%temp_file%" "%vmix_file%" > nul
|
||||
echo Replacement completed successfully!
|
||||
echo URLs matching these patterns were replaced:
|
||||
echo - IP addresses with ports (http://127.0.0.1:8000 etc.)
|
||||
echo - Three-part domains (https://gfx.tvstart.ru etc.)
|
||||
echo Replacement: %replace%
|
||||
) else (
|
||||
echo Error: Failed to process file
|
||||
)
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user