Hello,
Im running the following script to delete files and folders in a directory and its subdirectories and keep the folder structure.
Right now everything works fine but hidden folders are not deleted ($RECYCLE.BIN)
This is the script: Get-ChildItem -Path D:\path\to\data -Include * -File -Recurse | foreach { $_.Delete()}
So all the data, from the subfolders in D:\path\to\data are deleted except the hidden one.
Can someone help?
Thanks,
LEVD