Toogit Social Post

Pratik Bhor

9 months ago
To delete the files, is there a wild card that can be used in the folder path?

In Powershell, I am trying to delete old files off of the system by modified date. Is there a wild card that can be used in the folder path?

for /d %%D in ("C:\folder1\folder2\*.*\files") do forfiles /p %%D -s -m *.txt -d -5 -c "cmd /C del @File"

I need it to run for all files directories under that path. I tried * and *.* but it did not work.
2 Likes
0 comments, 0 Followers

No comments yet!