I have multiple folders in Windows Explorer which have some part of the name the same and some not. For example:
And I would like to change the first part "FIRST" to "SECOND" so the result should look like this:
This is a simple example and of course if there were only 3 folders I wouldn't ask it, but sometimes I have up to 30 folders where I need to change only some part.
Any help would be much appreciated.
#IfWinActive ahk_class CabinetWClass
F1::
for window in ComObjCreate("Shell.Application").Windows
try Fullpath := window.Document.Folder.Self.Path
; MsgBox, %Fullpath%
Loop, Files, %Fullpath%\FIRST_*, D
{
; MsgBox, %A_LoopFileName%
StringReplace, NewFileName, A_LoopFileName, FIRST_, SECOND_
FileMoveDir, %Fullpath%\%A_LoopFileName%, %Fullpath%\%NewFileName%, 1
}
return
#IfWinActive