File move operation failed to work on path length over (approx) 280 characters
Closed this issue · 5 comments
danielkcng commented
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]"
- $sourceFilePath is a short path, and the file does exist
- 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)
Yomodo commented
Just checking, you are using AlphaFS 2.2.1?
danielkcng commented
Yes, I tried both 2.2.0 and 2.2.1, same result.
BTW, if the SourceFilePath is long, the Move also failed.
Yomodo commented
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.
danielkcng commented
Oh sorry, I must be in bad condition today, I typed the paths incorrectly ☹, causing the errors, despite checking them visually before I posted the issue.
Yomodo commented
We've all been there. 😄