I am trying to delete files and folders from specific directory like entire $item (including the folder and its subcontents) has to be deleted from $workingFolderPath
> Get-ChildItem -Path "$WorkingFolderPath" -Directory -Filter "$item" -Verbose 4>&1 | Remove-Item -Recurse -Confirm:$false -Force -ea SilentlyContinue -Verbose 4>&1|Out-File -Append "$LogPath\log.txt"
$workingfolderpath is d:\workingfolderpath ; $item is abcdefg.upm_2020-07-01_16.17.58
I was able to view these files when I uncheck the option " Hide protected os files" from folder options.
Could you please suggest mea way to delete such folder containing long tree or long path.
Also please help me to log the verbose operations from the above command. I am unable to log them.
your help is much appreciated. Thanks in advance