Abhisheksaravanan Posted October 13, 2015 Posted October 13, 2015 I'm trying to create a batch script which deletes the files and the folders older than 2 weeks. This is the script i'm using, but this dosent work as expected . Forfiles /P C:\TEST1\log_output /S /M *.* /D -14 /C "cmd /C del @path" >"C:\TEST1\TEST1.log" 2>&1 Forfiles /p C:\TEST1\log_output -D -14 -C "CMD /C IF @ISDIR==TRUE ECHO rd /d /s @filE&rd /q /s @filE" can someone help me on this, I'm new to scripting and fresher.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now