I am trying to copy files within ShareFile. If I use
named paths I can get it to work with the copy-sfItem call. Unfortunately what I am dealing with is the item IDs. How do I make a copy call with item IDs or how can I get the actual directory path given an item ID?
$sfClient = Get-SfClient -Name "$HOME\Documents\OurDomain.sfps"
New-PSDrive -Name sf -PSProvider ShareFile -Root / -Client $sfClient
-Path sf:"/Shared Folders/IT/test/From/Adobe Acrobat" -Destination
sf:"/Shared Folders/IT/test/To/" ***This works***
$FromShareFileFolder = (Send-SfRequest $sfClient -Entity Items -Id (ID From Browser))
$FromShareFileFolderUrl = $FromShareFileFolder.Url
$FromShareFilePath = $FromShareFileFolderUrl.AbsolutePath
$ToShareFileFolder = (Send-SfRequest $sfClient -Entity Items -Id (ID From Browser))
$ToShareFileFolderUrl = $ToShareFileFolder.Url
$ToShareFilePath = $ToShareFileFolderUrl.AbsolutePath
Copy-SfItem -Path sf:$FromShareFilePath -Destination sf:$ToShareFilePath *** This does not work***
Any advice would be helpful
Be the first to post a reply!