Powershell's "Move-Item" command fails with "The directory name is invalid."

  • 7015829
  • 24-Oct-2014
  • 24-Oct-2014

Environment

Novell Client 2 SP3 for Windows (IR8) or (IR9)
Powershell

Situation

Rename a directory with the Powershell "Move-Item" command fails if a trailing backslash is included. The following error is displayed: 

The directory name is invalid.

Example:

PS C:\Users\User1> move-item y:\test\ y:\test1\
Move-Item : The directory name is invalid.
At line:1 char:10
+ move-item <<<<  y:\test\ y:\test1\
    + CategoryInfo          : WriteError: (Y:\test\:DirectoryInfo) [Move-Item], IOException
    + FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

Status

Reported to Engineering