Command do delete files that are older then X days

Command do delete files that are older then X days

@ECHO delete log files older then 5 days
forfiles /P "<PATH>" /m <partoffilename*.extention> /d -5 /C "cmd /c del @file"