$gtmdir="/Volumes/LIBRARY3/DataSpace-Library-Library3-main/book_set/Graduate_Texts_in_Mathematics/";

$gtmfiles=FileNames["*.*",{$gtmdir}]

?RenameFile

RightComposition[
(*RandomSample[#,5]&,*)
RenameFile[#,FileNameJoin[{DirectoryName[#],StringReplace[FileBaseName[#],"."-> "_"]<>"."<>FileExtension[#]}]]&/@#&,
RenameFile[#,FileNameJoin[{DirectoryName[#],StringReplace[FileBaseName[#],RegularExpression["(GTM\\d+)_(.*)"]-> "[$1]$2"]<>"."<>FileExtension[#]}]//Echo]&/@#&
][$gtmfiles]