[Gambas-user] Delete a file requiring Admin privilege

John Rose john.aaron.rose at ...626...
Fri Feb 1 20:02:46 CET 2013


I want (in Gambas3) to delete a file in e.g. /usr/share/applications. 
sInstallPath may have spaces in its filename: that's why I used a single 
quote round it.

I've tried
Exec ["gksudo", "rm", "'" & sInstallPath & "'"]
which doesn't give an error but doesn't delete the file.

I've tried
Exec ["gksudo rm", "'" & sInstallPath & "'"]
which gives an error saying that the child program/process is not found 
and doesn't delete the file.

How do I code this (without using Shell) so that there are no errors and 
the file is deleted?

-- 
Regards,
John





More information about the User mailing list