Unable to download Artifactory using file specs from Jfrog via Jenkins pipelines

The Jenkins pipeline code used is given below : I am trying to download the tar from JFrog artifactory using file spec inside Jenkins pipelines and the code used is given below.

 steps {
    script {
    def artifactoryServer = getArtifactoryServer 'XYZJFROG'
    String targetFileLoc = "${WORKSPACE}\\recupTar\\"
    def buildInfo = artifactoryDownload(
    spec: """{
    "files": [{
    "pattern":"XYZ/ABC/TEST/${env.JFROG_ART_FOLDER}/${params.RecuperationTar}/${env.JFROG_ART_FOLDER}-${params.RecuperationTar}.tar",
    "target": "${targetFileLoc}"
    }]
    }""",
    buildInfo: new BuildInfo(),
    module: "TEST",
    failNoOp: true,
    server: artifactoryServer
    )
    }
    }
    }

The tar is being downloaded in multiple threads and i am getting the below given error for each thread and finally the last I/O error:

java.io.IOException: Unknown I/O error listing contents of directory: C:\Windows\TEMP\8188781397582827352
        at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:2190)
        at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:333)
        at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1192)
        at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadFileConcurrently(DependenciesDownloaderHelper.java:256)
        at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadArtifact(DependenciesDownloaderHelper.java:209)
    Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 94f912cc-d89c-43fb-a807-ce10c79240d6
    Caused: java.io.IOException
[Thread downloader_2] downloading C:\Windows\TEMP\7602835089104072470\FRA/XYZSOFT/REP1/V4_YY_XXX/REP1-V4_YY_XXX.tar2 as part of file DELIVERY/FRA/XYZSOFT/REP1/V4_YY_XXX/REP1-V4_YY_XXX.tar threw an exception: java.io.IOException: Could not create nor write to file: C:\Windows\Temp\7602835089104072470\FRA\XYZSOFT\REP1\V4_YY_XXX\REP1-V4_YY_XXX.tar2
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:34)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.setResponse(DownloadToFile.java:40)
	at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.processResponse(JFrogService.java:143)
	at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute(JFrogService.java:123)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.downloadToFile(ArtifactoryManager.java:128)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.lambda$doConcurrentDownload$0(DependenciesDownloaderHelper.java:277)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.FileNotFoundException: C:\Windows\TEMP\7602835089104072470\FRA\XYZSOFT\REP1\V4_YY_XXX\REP1-V4_YY_XXX.tar2 (The system cannot find the path specified)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:184)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:30)
	... 6 more

[Thread downloader_1] downloading C:\Windows\TEMP\7602835089104072470\FRA/XYZSOFT/REP1/V4_YY_XXX/REP1-V4_YY_XXX.tar1 as part of file DELIVERY/FRA/XYZSOFT/REP1/V4_YY_XXX/REP1-V4_YY_XXX.tar threw an exception: java.io.IOException: Could not create nor write to file: C:\Windows\Temp\7602835089104072470\FRA\XYZSOFT\REP1\V4_YY_XXX\REP1-V4_YY_XXX.tar1
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:34)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.setResponse(DownloadToFile.java:40)
	at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.processResponse(JFrogService.java:143)
	at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute(JFrogService.java:123)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.downloadToFile(ArtifactoryManager.java:128)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.lambda$doConcurrentDownload$0(DependenciesDownloaderHelper.java:277)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.FileNotFoundException: C:\Windows\TEMP\7602835089104072470\FRA\XYZSOFT\REP1\V4_YY_XXX\REP1-V4_YY_XXX.tar1 (The system cannot find the path specified)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:184)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:30)
	... 6 more

[Thread downloader_0] downloading C:\Windows\TEMP\7602835089104072470\FRA/XYZSOFT/REP1/V4_YY_XXX/REP1-V4_YY_XXX.tar0 as part of file DELIVERY/FRA/XYZSOFT/REP1/V4_YY_XXX/REP1-V4_YY_XXX.tar threw an exception: java.io.IOException: Could not create nor write to file: C:\Windows\Temp\7602835089104072470\FRA\XYZSOFT\REP1\V4_YY_XXX\REP1-V4_YY_XXX.tar0
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:34)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.setResponse(DownloadToFile.java:40)
	at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.processResponse(JFrogService.java:143)
	at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute(JFrogService.java:123)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.downloadToFile(ArtifactoryManager.java:128)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.lambda$doConcurrentDownload$0(DependenciesDownloaderHelper.java:277)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.FileNotFoundException: C:\Windows\TEMP\7602835089104072470\FRA\XYZSOFT\REP1\V4_YY_XXX\REP1-V4_YY_XXX.tar0 (The system cannot find the path specified)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:184)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:30)
	... 6 more

Any remarks, help would be much appreciated.

Hi Rohit

I am getting similar issue. Are you able to resolve this ?Please suggest if any workaround for this.

Not yet please let me know if you find anything at your end.