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
ファイルのコピーされていることです。これをどうすれば解決できますか?