How? Rename movie, then rename parent folder... TOGETHER

I am currently trying to make a button to run these two functions one ater the other:

C:\Program Files\FileBot\filebot -rename {F} --format "{n} ({y}) [{vf}]" -non-strict

Rename {filepath$|..|noterm} TO {file$|noext}

The first one uses filebot to rename the file. This works fine on its own. The second is to rename the parent folder to the new name of the file. This also works fine on its own. However, when I put these together in one function it does not rename the parent folder, unless I have already pressed this button once (which will rename the file), then press it AGAIN (at which point it will rename the parent folder).
I thought maybe it's running the second command too soon, before the file was renamed so I tried adding @sync to the beginning but it didn't make a difference.
Any thoughts on what I might be doing wrong?

You can probably do both the file and folder using Filebot, judging by the first item on the Filebot FAQ about moving files and renaming folders:

If you do need to do half in Filebot and the other half in Opus, it might need some scripting, since Opus won't automatically know that the filebot.exe command happened to rename the file or that you want the file's new name (which Opus may not have been notified of yet) to be used for {file$} in the second line. A script may be able to force the refresh and find the file's new name, or get the new name from Filebot somehow (if it provides a way), but it's probably a lot easier to handle both the file and folder in Filebot.

Great suggestion. I will try to find out what the command would be. Not sure how to call up a folder as opposed to the File.

It seems they either don't know how to do it (over in the filebot forums) or they're just ignoring my question. Either way I'd like to keep trying with DOpus. I'm trying the ping kludge that someone suggested but maybe I'm not setting it up right. This is what I have and it's not working:

@sync C:\Program Files\FileBot\filebot -rename {F} --format "{n} ({y}) [{vf}]" -non-strict
@sync ping.exe -n 7 >nul
Rename {filepath$|..|noterm} TO {file$|noext}

This does not seem to have an effect on what you mentioned earlier that Opus doesn't already know of the file name change. How can I force a refresh like you were saying? or do you have a suggestion for what I pasted above? I'm really not very good with these functions....

Bueller? Beuller? ... Bueller?

To get Opus to rename something after filebot renames it, Opus will somehow need to be told what the new name is (or you'll need a script to work it out somehow). Which puts you back in the realm of needing help from someone who knows about filebot, the same as the better solution of doing both renames in filebot.

We could try to help with doing both renames in Opus and not using filebot at all, but if there's something uniquely possible with filebot that means it has to be invoved then you'll probably need help from the people who knows filebot it to answer questions on how to use it.