Firstly, apologies for my lack of knowledge in this area. I have been using a basic forfiles batch and have made some changes but I can't get the script to delete the folders also. Currently it works fine to delete all of the files, including files in subfolders but leaves the folders empty.
E.g. there are files and folders created in the Projects folder "C:\Files\Projects\" example:
C:\Files\Projects\1\random.txt
C:\Files\Projects\2\test\hello.xlsx
How can I include to delete the folders in addition to the files, in the top directory and subfolders?
My current script which outputs the deleted files to a log file:
forfiles /p "C:\Files\Projects" /s /m *.* /D -7 /C "cmd /c del /q /s @path" >> C:\Script\Deleted.log
Thanks so much!