Below is the Error am getting...Shared Folder has many Subfolders also..i am trying to run the command using Domain Admin..and permssions are set from and to the path am accessing..
dir : 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.
At line:1 char:15
- $FolderPath = dir -Directory -Path "\neurodc.nsh.com\Shared Folders" -Recurse ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : ReadError: (\neurodc.nsh.c..._09_2012_202127:String) [Get-ChildItem], PathTooLongException
- FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
dir : 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.
At line:1 char:15
- $FolderPath = dir -Directory -Path "\neurodc.nsh.com\Shared Folders" -Recurse ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : ReadError: (\neurodc.nsh.c..._09_2012_202752:String) [Get-ChildItem], PathTooLongException
- FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand