Unable to delete files Samsung Android 12/13

Solved
LC
Leon Callsen Silver Contributor
Taneri Consulting GmbH (TCG Global)

Hi Everyone, 

I have another question for you guys because I am unable to find a solution for my issue. 
For an app we're installing on Samsung Tab Active 3 with Android 12/13. 
We have to store additional files in the path: "/sdcard/Documents/App"
Due to Scoped Storage we have to use a folder like this. 

We want to rollout a new version of this app and have the change the every file in this path mentioned above. 
If I update my profile where these additional files are stored than the old files won't be deleted. 

I tried to add a preinstall-script like "del /sdcard/Documents/App" to delete the old files. 
It doesn't work. The only options for me which is working is to deleted the files on every device manually over remote control. 
If I remove or revoke the profile nothing happens on the device. 

Do you have any ideas how I can delete those files because I got more than 700 devices. 

2 years ago
Android
ANSWERS