I have a question about batch files. For instance,
forfiles /p "C:\Users\ ..." /s /m . /D -150 /C "cmd /c del @path"
Is it possible to run this, then change the -150, to -130, -110 automatically instead of writing multiple commands like
TITLE DELETE OLD FILES
forfiles /p "C:\Users\ ..." /s /m . /D -150 /C "cmd /c del @path"
forfiles /p "C:\Users\ ..." /s /m . /D -130 /C "cmd /c del @path"
forfiles /p "C:\Users\ ..." /s /m . /D -110 /C "cmd /c del @path"
PAUSE
Rationale: The system stores data about a semiconductor related equipment and holds files which are about more than 2 years old. However, deleting these files immediately will cause a crash. Hence, I am deleting these files periodically.
I will also appreciate if there is a command which allows the user to choose when to display the current storage space available, and then allows the user to choose whether to delete the next batch of files.
I have asked the same question, "https://stackoverflow.com/questions/72428986/how-to-delete-batch-files-cmd-from-the-oldest-date-first-then-iterate-till-a" and answered the responses. However, I am still stuck and unfamiliar on how to proceed.
Thank you.