I can't think of a good way to do this. So if I wanted to accomplish the same goal, I'd just do a plain old fashioned drag and drop of the subitile.srt file. Next I'd copy the movie.avi filename without the .avi extension and then paste that name in place of subitile in the subitile.srt file.
If it would help, it should be fairly easy to create two hotkeys, one which copies the selected filename (minus the extension) to the clipboard and another which sets the selected file to the name in the clipboard (preserving the extension).
That would let you do something like a Ctrl-C / Ctrl-V (though with different hotkeys) to quickly copy the filename from one file to another.
If that sounds good shout and I'll reply with the commands.
I'm wondering if it's possible to adjust it so that when you paste the filename, it still keeps the inline rename open, with the cursor at the end of the pasted filename so that you can add something at the end of it. This would be useful to rename similar files in the same folder, because when you try to run the paste command and there's already a file with the same filename, you get an error. Any suggestions?
Strange, the button Leo suggested above was working great but now, for some reason, it's stopped working for renaming folders. Or perhaps I just never noticed the quirk from the get-go.
Rename REGEXP PATTERN (.+)(\.[^.]+) TO "{dlgstring|Enter base filename|{clip}}\2"
It works perfectly for files, but not for folders. Looking at the regexp pattern has me a little confused...I think there's a portion of it that indicates a filename extension, but I'm not sure. Perhaps this is why it's not working on folders?
The button would only work on directories that had a . in their name.
The regular expression b(.[^.]+)[/b] looks for the last . in the name and then splits the name into what comes before it (the main file/folder name) and what comes after it (the file extension).
The \2 at the end of the command inserts that second thing (the file extension) at the end of the new name, so that the file extension is preserved.
If you just want to rename a folder (or a file, ignoring its extension completely) to what's in the clipboard you don't need to use regular expressions at all.
By looking at some other scripts and fiddling around with code, I seem to have something that works:
Rename PATTERN * TO "{dlgstring|Enter base filename|{clip}}.{ext}" FILEINFO AUTORENAME
The button works on both files and directories. However, I'm not sure if there's a simpler way of going about it. I haven't tested it out enough to see if it will work in all scenarios.
No, dropping a file on to another file isn't possible, except if the target file is an EXE (which would run the EXE with the file you dragged as an argument).
It might be possible via some kind of shell extension, but not by any simple config change that I know of. Using the clipboard still seems like the best bet.
Or you could make a rename script or some other command that is passed the names of both files and works out which rename to do.