alphaleonis/AlphaFS

File move operation failed to work on path length over (approx) 280 characters

Closed this issue · 5 comments

Using Powershell command
[Alphaleonis.Win32.Filesystem.File]::Move($sourceFilePath, $destFilePath)

gives:
Exception calling "Move" with "2" argument(s): "(3) The system cannot find the path specified: [\?$sourceFilePath]"

  1. $sourceFilePath is a short path, and the file does exist
  2. If the $destFilePath is somehow longer than around 280 characters, I got the error. Shorter length, such as 275 does work (even it's longer than the 260 Win32 API limit)

Just checking, you are using AlphaFS 2.2.1?

Are $sourceFilePath and $destFilePath relative or absolute paths?
(Could you post the paths.)

If I look at the error, it seems that $sourceFilePath is passed literally, not its value.

We've all been there. 😄