окон move
. unix mv
Пример
Windows
move my_original_file_name.txt my_new_file_name.txt
Unix:
mv my_original_file_name.txt my_new_file_name.txt
Ваша конкретная задача в Windows:
SetLocal EnableDelayedExpansion
set your_file_location=%userprofile%
set your_file_name=!your_file_location!\file1.txt
for "eol=; tokens=1 delims=" %%n in ('type "!your_file_name!"') do (
set new_file_name=%%n
)
move "!your_file_name!" "!your_file_location!\!new_file_name!.txt"