1
디렉토리 파일 example-file-5.0.0.0.jar
에서 찾고 다른 이름으로 복사했습니다. 나는이 스크립트를 작성했습니다 :버전이 지정된 파일을 다른 디렉토리에 복사합니다.
Get-ChildItem -Path $directoryFrom | Where-Object { $_.Name -match "example-file-\d\.\d\.\d\.\d\.jar$" } | Copy-Item -Destination $directory\"example-file.jar -Recurse -Force
문제는, 내가 같은 디렉토리에 example-file-5.0.0.0-debug.jar
라는 이름의 다른 파일을 가지고 대신 example-file-5.0.0.0.jar
파일의 복사 점이다. 이 문제를 어떻게 해결할 수 있습니까?