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.
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.