Hi, i’m a begginer with powershell
I want to make a script to delete all files from a repertoire called mydocuments without touching some other shild files, for exemple :
if i have my document that have :
a file with name MYWORk
i want to delete all the file in mydocument without touching the file call MYWORK.
get-childitem -path "FilePath" -Recurse -ne "MYWORk" | remove-item -Force
-ne For Not equal
but it dosent work correctly.
Thanks in advance