我有一个用C#编写的程序,该程序使用powershell位传输从计算机上载和下载文件。直到今天,当上传和下载停止工作时,出现此错误,它的运行状况一直很好。似乎该错误是我的计算机本地的,因为其他计算机可以通过位传输正常工作,并且重新启动计算机无法解决问题。
有人可以帮我吗?谢谢
PS Start-BitsTransfer -Source \\ip\data\filename.xml -Destination G:\\PLAYGROUND\\dir\\\
Start-BitsTransfer : Object reference not set to an instance of an object.
At line:1 char:19
+ Start-BitsTransfer <<<< -Source \\ip\data\filename.xml -Destination G:\\PLAYGROUND\\dir\\\
+ CategoryInfo : NotSpecified: (:) [Start-BitsTransfer], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.BackgroundIntelligentTransfer.Management.NewBits
TransferCommand
PS Start-BitsTransfer -Source G:\\PLAYGROUND\\dir\\file.txt -Destination \\\\ip\\data\\\
Start-BitsTransfer : Object reference not set to an instance of an object.
At line:1 char:19
+ Start-BitsTransfer <<<< -Source G:\\PLAYGROUND\\dir\\file.txt -Destination \\\\ip\\data\\\
+ CategoryInfo : NotSpecified: (:) [Start-BitsTransfer], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.BackgroundIntelligentTransfer.Management.NewBits
TransferCommand
最佳答案
我改用copy命令修复了它。