Using cmd I want to delete all of the files in the directory except specific files for example .txt which are older than 2 days.
im unable to combine between forfiles and deleting everything beside a specific file type.
forfiles /p "C:\what\ever" /s /m *.* /D -<number of days> /C "cmd /c del @path"
where and how i can add the exception i want ?
Thanks !