回复 18# 523066680
你用的哪个版本?
PS C:\Users\GNU> Create-File("filename.ext").IfThisFileExists.AddSuffixtoFileName("重复%d")
You cannot call a method on a null-valued expression.
At line:1 char:1
+ Create-File("filename.ext").IfThisFileExists.AddSuffixtoFileName("重复%d")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
PS C:\Users\GNU> Get-Host | Select-Object Version
Version
-------
4.0 |