There is a folder A under drive D. There are 30 folders in A, named 1, 2, 3... 30 respectively. In each of these 30 folders, there are respectively 30 folders, also named 1, 2, 3... 30. Now I need to search for files that are N days old in the directories (such as A:\1\1, A:\1\30, A:\30\30) and delete them. How to do it?
The command forfiles /p "D:\A\1\30\" /d -N /c "cmd /c echo deleting @file ... && del /f @path" can delete files that are N days old, but I need to manually change 1\30 (the names of the two subsequent directories), which is too cumbersome. How to operate?
The command forfiles /p "D:\A\1\30\" /d -N /c "cmd /c echo deleting @file ... && del /f @path" can delete files that are N days old, but I need to manually change 1\30 (the names of the two subsequent directories), which is too cumbersome. How to operate?
