I'm copying a large amount of data using AzCopy and I need to have a way to retrieve the files that failed to copy.
AzCopy creates a nice log from each job and can do something like this:
Select-String -Path C:UsersXXX.azcopyProjects304c22cc-d37d-d743-7597-a160ac0ebad2.log -Pattern 'UPLOADFAILED'
But the output looks like that:
.azcopyProjects304c22cc-d37d-d743-7597-a160ac0ebad2.log:25528:2021/01/04 16:45:19 ERR: [P#0-T#2357] UPLOADFAILED:
%5C%5CUNCfileserver.contoso.networkPROJ$AAAABBBBCCCCEigenerkl+?rungen.pdf_DOC001719.pdf : 000 : Could not check destination file existence. ->
github.com/Azure/azure-storage-file-go/azfile.newStorageError, /home/vsts/go/pkg/mod/github.com/!azure/[email protected]/azfile/zc_storage_error.go:42
I need to carve out only the file path and name from this output. In the exampe below, I need to carve out:
fileserver.contoso.networkPROJ$AAAABBBBCCCCEigenerkl+?rungen.pdf_DOC001719.pdf
Does anyone have any idea how? I can't search based on the file name because I have over 2000 files that have failed and I need to carve out all of them.
Kind regards,
Wojciech
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…