I found out that part of my script’s copying (using Copy-Item) are failing due to following problem:
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Indeed - I had too long path sometimes.
Tried to use robocopy, but it is copying whole directory when ,according to my flow, I need only few specific files from the directory.
I implemented another idea - to do a mapping for longest part of the path. But in spite of the fact that I am instructing Copy-Item to use the mapping - it still fails and in the error message I see same full path. Like it is ignoring mapping…
Any ideas what to do here ?