Ola Hallengrens - Output File cleanup does not delete files
I should add that this works fine with 2 or more instances that are not set up with availability groups. It's only when it's more then 1 instance and AG set up. But what I did instead was to edit the parameters and change $(ESCAPE_SQUOTE(SQLLOGDIR)) to the actual path folder and it worked great.