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:\Users\XXX\.azcopy\Projects\304c22cc-d37d-d743-7597-a160ac0ebad2.log -Pattern 'UPLOADFAILED'
But the output looks like that:
.azcopy\Projects\304c22cc-d37d-d743-7597-a160ac0ebad2.log:25528:2021/01/04 16:45:19 ERR: [P#0-T#2357] UPLOADFAILED: %5C%5C\UNC\fileserver.contoso.network\PROJ$\AAAA\BBBB\CCCC\Eigenerkl+�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/azure-storage-file-go@v0.8.0/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.network\PROJ$\AAAA\BBBB\CCCC\Eigenerkl+�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