Automation to delete files

Automation to delete files

Hi community


I am looking to have a script that will run daily at 1am and delete files older than 90 days from a specific folder.

Filenames are set as below: XXXXXX_YYYYMMDDhhmmss_WWWWW.png

XXXXXX and WWWWW are constant names

YYYY is year

MM is month

DD is day

hh is hours

mm is minutes

ss is seconds


Is there a way to achieve the above ?


Thanks for your help


3 Answers

Order By:   Standard | Newest | Votes
Scott | posted this 22 November 2019

Need more information.  Deleting files on the server or device?  If server then a standard windows scheduled task is probably the easiest way to accomplish it.  If device then it depends on device type and MobiControl versions and you'll need to provide more specifics.

  • 0
  • 0
Alexis | posted this 24 November 2019

Thank you for your reply Scott.


Files are to be deleted on Android+ devices.

Version of MobiControl is 13.3.0


Deleting the files is not really the challenge, the challenge is to grab and calculate the date during script execution. I would like to avoid to have to update the script every day with proper date. I have had difficulties to find out information about that.

  • 0
  • 0
John Doe | posted this 25 November 2019

When your devices are enrolled as Android Plus you may want to take a look at javascript script engine released with SOTI 15.0

Kind Regards John

  • 0
  • 0

Give us your feedback
Give us your feedback