I'm using the code referenced here: with the examples etc but I'm running into an error with this line:
$remotefilehash = ($remotefiles -replace '^[a-f0-9]{32}( )', '$0= ' -join "`n") | ConvertFrom-StringData
https://stackoverflow.com/a/69782527/800592
here's the full error:
ConvertFrom-StringData : Data item '4826367e20469078693dced6dc642b96' in line '4826367e20469078693dced6dc642b96 = My Videos/Drone/DJI-FPV/DJI_0003.MP4' is already defined.
At P:\scripts\code\pcloud_sync.ps1:66 char:86
+ ... ace '^[a-f0-9]{32}( )', '$0= ' -join "`n") | ConvertFrom-StringData
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
Update2
I think my desire is to deduplicate my remoteFiles
object which is simply an list/arry? of md5sum file path. since it seems like there are times where there is the same file in two different paths I want to de duplicate the remoteFiles obj on the md5sum