Forfiles Batch Script (Escaping @ character)

后端 未结 8 950
闹比i
闹比i 2020-12-15 05:35

I\'m working on a batch script that will let me delete files older then a set period using forfiles. For now, I\'m aiming at printing the files that will be deleted.

8条回答
  •  情歌与酒
    2020-12-15 06:37

    I had the same problem until I removed the quotation marks around the directory path , like this:

    forfiles /S /P r:\ /m *.bak /d -10 /c "cmd /c echo @PATH"
    

    Hope that helps.

提交回复
热议问题