Adding an older than range to these scripts: "del /mnt/sdcard/documents/*" or "del %sdcard%documents/*"

Adding an older than range to these scripts: "del /mnt/sdcard/documents/*" or "del %sdcard%documents/*"

Hi, we use an app that stores documents and photos that I'd like to be able to delete using the above script, however, I'd like to schedule it so the script runs daily and deletes and documents/photos older than 30 days. Has anyone done something similar? If so, what script/parameters did you user?

 

All devices are Samsung A50s, in case that is relevant.

 

Thanks

  • 17 March 2021
  • SOTI MobiControl
  • 2 Answers
  • 0 Upvote
  • 1 Follower
  • 350 Views
    • 2 Answers
    • 0 Upvote
    • 1 Follower

2 Answers

Order By:   Standard | Newest | Votes
RRMOD@SOTI | posted this 17 March 2021

Hi James,

 

Thank you for request an answer from SOTI Support.

 

Our scripts that are supported for Android devices don't support a way to delete files that are beyond a certain date. You can delete the files but you can't specify the date. Currently, we do have this feature in current MobiControl version.

You can also use the JavaScript as mentioned by @Raymond to construct a conditional script.

However, I would like you to create a support case (click here) or call SOTI Support team(click here) to raise a Feature Request. These feature requests should be created by customers via a Support case.

To provide you with a heads up, this would not be an instant resolution as SOTI Product Team have to work internally with different departments to get this added. So, this may take weeks to months to get it included in the new build. Please follow the release notes of SOTI MobiControl to get an update on the improvements done on the new release.

https://docs.soti.net/soti-mobicontrol/release-notes/

 

Also, if this post has helped you in solving your inquiry, I would request you to mark the particular comment as "is solution", so others may benefit from this information.

 

Kind Regards, Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

  • 0
  • 0
Raymond Chan | posted this 17 March 2021

As far as I know, the legacy script engine does not support this.  Maybe this is indirectly made possible using conditional and loop constructs with the new javascript script engine, especially when more library functions are added hopefully in the near future.

 

Until then, you might need a third-party file manager app to do what you need.

 

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback