From _DIRECTORY to _TAG

Hello there need some help I would like to do this automatically

1)

2)

if CD or Vinyl in directory automatically add new tag RELEASESOURCE "WEB,CD or VINYL", thanks.

if your example is a typical one then you have a pattern like this:
%dummy%-%dummy%-%RELEASESOURCE%-%dummy%-flac\%dummy%

Enter this mask into Convert>Filename-Tag
and see whether the preview shows a satisfying result.