practize_1course/templates/heavy_case/rename.bat
2026-07-06 12:59:08 +03:00

47 lines
1.2 KiB
Batchfile
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 > nul
if "%~1"=="" (
echo You must specify the name prefix >&2
echo E.g. prefix "my_prefix" : >&2
echo h___фитирование.nb --^> my_prefix_фитирование.nb >&2
exit /b 1
) else (
if exist "h____фитирование.nb" (
rename "h____фитирование.nb" "%~1_фитирование.nb"
) else (
echo skipped "h____фитирование.nb" due to absence
)
if exist "h____pr_Qw2.nb" (
rename "h____pr_Qw2.nb" "%~1_pr_Qw2.nb"
) else (
echo skipped "h____pr_Qw2.nb" due to absence
)
if exist "h____pr_Qw1.nb" (
rename "h____pr_Qw1.nb" "%~1_pr_Qw1.nb"
) else (
echo skipped "h____pr_Qw1.nb" due to absence
)
if exist "h____osc_Qw2.nb" (
rename "h____osc_Qw2.nb" "%~1_osc_Qw2.nb"
) else (
echo skipped "h____osc_Qw2.nb" due to absence
)
if exist "h____osc_Qw1.nb" (
rename "h____osc_Qw1.nb" "%~1_osc_Qw1.nb"
) else (
echo skipped "h____osc_Qw1.nb" due to absence
)
if exist "h____gid_Qw2.nb" (
rename "h____gid_Qw2.nb" "%~1_gid_Qw2.nb"
) else (
echo skipped "h____gid_Qw2.nb" due to absence
)
if exist "h____gid_Qw1.nb" (
rename "h____gid_Qw1.nb" "%~1_gid_Qw1.nb"
) else (
echo skipped "h____gid_Qw1.nb" due to absence
)
)