0

I am running jenkins on windows under a domain user with administration rights. Part of my build script delete previous artefacts. Jenkins will successfully build once, after that it fails with

You do not have sufficient access rights to perform this operation.

On the delete artefacts line which looks like this:

Remove-Item -Path $pathArtifacts -Recurse

Jenkins created these artifacts so why can't it delete them? The job config is very simple and just runs a build.bat after svn checkout. The files are local and just on the C drive

Glef
  • 363
  • 1
  • 4
  • 12
  • Sounds very similar to this question; maybe you can use `-force`? http://stackoverflow.com/questions/25798272/cannot-delete-a-file-even-when-logged-in-as-an-administrator – Christopher Orr Apr 17 '15 at 12:03

1 Answers1

0

-force was the answer. Simple

Thanks Christopher

Glef
  • 363
  • 1
  • 4
  • 12