randle Posted November 22, 2016 Posted November 22, 2016 (edited) Hi, Yes, I know I got the letters above in the wrong order. Should have been FSRM doh! I'm trying to setup a Custom task to delete files of a certain age in the folder C:\TestFolder. In this example I want all files older than 1 day to be deleted, not moved. I've created a script: C:\Temp\Del.cmd with content: del *.* /s /q File Management Task Action: Custom Executable: C:\Windows\System32\cmd.exe Arguments: /c C:\Temp\Del.cmd Working Directory: Directory to which the file management task applies Command Security: Local System Condition: 1 day since file was created This is working fine, however, It deletes all files regardless of condition. I'm sure this is because I have *.* in the command path. Obviously I can add arguments in the script for the condition but then you may as well just create a windows scheduled task to run this. Any ideas how I can get the script to adhere to the FRSM FMT conditions? Edited November 22, 2016 by randle
sonik777 Posted May 20, 2025 Posted May 20, 2025 Hey there, Did you ever get an answer to this question? fast forward 9 years and I'm trying to do the same thing. Delete files after 60day retention. Thanks Will
jamiet147 Posted June 9, 2025 Posted June 9, 2025 There is a portable app called delage64.exe (https://www.horstmuc.de/wbat32.htm) that I use to do this. Below are a few examples. To delete any files ending .BAK which are older than 5 days: C:\Software\delage64.exe "E:\SBBackups\Daily\*.BAK" 5 To delete any files which are older than 7 days: C:\Software\delage64.exe "C:\Windows\TEMP\*.*" 7
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