ClassNotFoundException on old class but cannot delete the target directory

Hello,

I am trying to run a new Gatling script by running
Gatling -sf C:\New\Test\Directory -s com.mycompany.experiments.NewScript

But I get the following error:

c:>Gatling -sf C:\New\Test\Directory -s NewScript
GATLING_HOME is set to “C:\Users\Public\Gatling”

JAVA = ““C:\Program Files\Java\jdk1.8.0_131\bin\java.exe””
Exception in thread “main” java.lang.ClassNotFoundException: com.mycompany.myarea.OldScriptName$$ano
nfun$1
at io.gatling.app.classloader.FileSystemBackedClassLoader.findClass(FileSystemBackedClassLoader.scala:
70)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at io.gatling.app.classloader.SimulationClassLoader.io$gatling$app$classloader$SimulationClassLoader$$
$anonfun$2(SimulationClassLoader.scala:47)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at io.gatling.app.classloader.SimulationClassLoader.simulationClasses(SimulationClassLoader.scala:47)
at io.gatling.app.Selection$Selector.loadSimulations(Selection.scala:61)
at io.gatling.app.Selection$Selector.selection(Selection.scala:39)
at io.gatling.app.Selection$.apply(Selection.scala:33)
at io.gatling.app.Runner.run0(Runner.scala:78)
at io.gatling.app.Runner.run(Runner.scala:64)
at io.gatling.app.Gatling$.start(Gatling.scala:56)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:41)
at io.gatling.app.Gatling$.main(Gatling.scala:33)
at io.gatling.app.Gatling.main(Gatling.scala)

The script that can’t be found certainly doesn’t exist anymore, but my new script (the only script in the new directory) is not referencing it either, so I don’t know why Gatling should be trying to find it.

I thought I could simply delete the Gatling target directory, but I get a “permission denied” error. I have tried several ways to gain ownership of that directory and the files in it to delete then, but with no success. Any ideas what I can do to:
a) Get around the error, and
b) regain control of this directory?

Thanks,

Paul

Gatling 2.2.3, BTW.