Powershell Citrix ShareFile API 上传

问题描述

我的代码如下:

$ShareFileHomeFolder = (Send-SfRequest $sfClient -Entity Items).Url

New-PSDrive -Name sfdrive -PSProvider ShareFile -Client $sfClient -Root "\" -RootUri $ShareFileHomeFolder 

copy-SfItem -Path $File.FullName -Destination "sfdrive:\Test"

Remove-PSDrive sfdrive

当前:文件复制到 Personal Folders\Test

这就是我想要实现的: 如何将文件复制到与我共享\Reports\Folder1

请指教。

谢谢。

问候, 迈克尔

解决方法

谢谢。我设法解决了它。

#$_.Id is the folder ID you want to upload; xyz is your organisation
            
$ShareFileHomeFolder = "https://xyz.sf-api.com/sf/v3/Items("+$_.Id+")"          
            
##Create a PowerShell provider for ShareFile at the location specified
            
New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\" -RootUri $ShareFileHomeFolder
            
Copy-SfItem -Path $File.FullName -Destination "sfDrive:"
            
Remove-PSDrive sfdrive

谢谢。

问候, 迈克尔

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...