Hey there!
Just wanna know if I could use the action "Script" to delete files. Is there any function to do that?
Note:- I know that there's this action "Delete Files", so please don't suggest that. It's just that my flow requires using script to delete certain files.
Regarding deletion of files using scripting language
Moderator: Martin
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: Regarding deletion of files using scripting language
Hi,
That's only possible indirectly. You could use the the Java features of action script to instantiate a File object and call delete on it. Something like this should work:
Regards,
Martin
That's only possible indirectly. You could use the the Java features of action script to instantiate a File object and call delete on it. Something like this should work:
Code: Select all
file=callJavaConstructor("java.io.File", "File(java.lang.String)", "/storage/emulated/0/test.txt");
callJavaMethod(file, "java.io.File", "delete()");
Martin
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: Regarding deletion of files using scripting language
Thanks a lot Martin. That was a lot of help. Really invaluable.
Akhilesh
Akhilesh