Delphi build problem after switch to server 2022

Our existing build machine is running on Windows Server 2012 and we are migrating to a new server running Windows Server 2022 (as 2012 is now out of support). Both servers are running on Azure and have the same specs.

Trying to run our build process that includes multiple delphi compiles I’m getting the following error:

Fatal: F2039 Could not create output file ‘s:\delphi\bin\a.n.other file.exe’

The reason for posting is this isn’t happening consistently for the same build - sometimes its the first, sometimes second, sometimes later.

Anyone have any suggestions as to what I could try to solve this?

My first port of call is almost always antivirus. Try adding an exclusion for the output folder.

Do files exist there already from previous builds? If so try cleaning the folder first.

What sort of drive is s:\ ?

Are there other builds running at the same time (outputting to the same folder)?

Covering your comments:

No antivirus running

Files do already exist (each exe is always built twice, failure seems to be on the second build, never on the first even with it already existing) - will see if I can delete the first instance before starting the second build.

The s drive is created using the subst command

No other builds running at the same time