Moving all files (including non mp3) and rename if required

So here is what I am trying to tweak so it works properly...
I have an action that once I have processed the tags the way I want to it moves the files to a new folder from the existing one as completed...

FormatValue Directory:
$validate($replace(G:\Music$upper('['$left(%albumartist%,1)']')\%albumartist%\%album% $num(%year%,4), , ), %mediatype%,'_')

This works fine if there is no other non MP3 files (such as an artowrk folder) in the originating folder....am trying to pull that with it...

Than I would like to use the below for multi disc formating:

FormatValue Filename:
Disc $num(%discnumber%,2)\%_filename_ext%

However when I do this in sequence, it puts the files back into the originating folder...any way to anchor this FormatValue Filename action to the newly created Directory done from the above?

These work individually but would like to not have to re import the new folder for processing the multi disc folder request....and would also like to be able to pull any other non mp3 folder (ie: Artwork) during the initial move...

Thanks in advance as always ....

If you use fully qualified filenames with drive letter and the full path then you get the files into that folder that you want.
Relative filenames lead to relative paths - and that path may be longer or shorter.
I am a little puzzled about the statement
$num(%year%,4)
If this is intended to create a year with 4 digits, then it is not correct - even though it works:
The $num() function transforms a string into a number (and adds padding if stated) - it does not take the first stated digits - this would be achieved with $left(%year%,4)
If you have a date like
'2017-01-11' in the field YEAR then you do get 2017 with $num() as $num() stops its transformation at the first non-numeric character. That is why $num() is the function of choice to transform a track number of the format 2/10 into a plain 2.
Sorry, if the last bit was man-splaining.

Fair enough thank you for the explanation......As you pointed out it works for its purpose but isn't actually the correct usage...I will adjust going forward however the original question still remains....If I have just renamed the folder in the action above the file rename, how can I than use a fully qualified path if I have just used the tags to rename the folder?

As well, how do I get it to pull anything extra (cover art folder) with the move as my existing actions leave them behind and they than have to be manually moved...?

Should I perhaps use a "_working dir" tag and poplulate it with the new folder path than use something like the Disc $num(%discnumber%,2)\%_filename_ext% option? Or is that just complicating it more...I do tend to overthink things....

If you rename a folder like

e:\music\abba\gold
(which follows the pattern of e:\music\%artist%\%album%
with an action of the type "Format value" for _directory to
e:\music\abba\goldener
and the original folder
e:\music\abba\gold
contains a folder
e:\music\abba\gold\pictures
then this picture folder will be moved also to
e:\music\abba\goldener
becoming
e:\music\abba\goldener\pictures.

The rule of the thumb:
Formatting the _FILENAME really only treats the individual file.
Formatting the _DIRECTORY moves the whole folder to a new location and takes all objects in it along.
So if you want to rename files and folders in the same action group then format the _FILENAME with just the name components but no path ingredient.
Then format the _DIRECTORY with an absolute path (but no _FILENAME components).

Which makes sense but why is it when I have moved using format _DIRECTORY to a new location than attempt to use format _FILENAME to put into individual disc folders in the NEW DIRECTORY that was just created does the system move them back to the ORIGINAL starting folder at the beginning of the process once the format _FILENAME action is applied? They would appear to be anchored in some way and if I refresh the tags prior to the _FILENAME format using the Refresh file view option they disappear as they are no longer in the original location?
True I can go to the new location and pull the files for processing that way however if there is an easier solution?

I think I read somewhere in the threads that in action groups those actions that rename a folder or generate a report are always executed last for all the files.
So this could be the source for the puzzling behaviour.

I would use absolute paths in this action group. This would move all the files to the new destination and finally rename the folder. Or something like that.

@Florian:
Any idea why after a rename _directory function is applied why is that if you try to apply a _filename format all files are moved back to the origin directory and the _filename rename is not applied to the updated directory?

What happens if you use an absolute filename to rename the files?

So I have fixed this issue by adding folder path to the equation and this seems to have resolved the pull back.
So basically the new function is:

Format Value:
_Filename

%folderpath%Disc $num(%discnumber%,2)%_filename_ext%