GLBasic forum

Main forum => GLBasic - en => Topic started by: Hark0 on 2012-Oct-22

Title: DELETEDIR() function?
Post by: Hark0 on 2012-Oct-22
Hi!


Searching on help and forum about DELETE dir... I found a "trick DOS" shell command in forum for delete folders on computer...

but

I NEED delete function that works on all compiled platforms...

Any help?


TIA, Hark0
Title: Re: DELETEDIR() function?
Post by: msx on 2012-Oct-22
Have you tried using KILLFILE?
Title: Re: DELETEDIR() function?
Post by: hardyx on 2012-Oct-22
You must to delete the contents of the directory and then the directory. You could use a shell command depending the platform. In Windows use "del /s /q dir" and in Unix-like platafoms (android/webos/iphone?) use "rm -rf dir". These commands delete the dir and all the contents without confirmation. Be carefull with this.
Title: Re: DELETEDIR() function?
Post by: matchy on 2012-Oct-22
One function to simply recursively list all and then delete each file item and folder would be the general way for all platforms for content that was produced by the app in it's user document folder.  :whistle:
Title: Re: DELETEDIR() function?
Post by: mentalthink on 2012-Oct-22
This will good... Like we have createdir.. deletedir, or killdir, will be a nice command and very usefull...
Title: Re: DELETEDIR() function?
Post by: spacefractal on 2012-Oct-22
please aware this can been dangerous, howover use recursively deleting. There is one in SLDActivity.java doing that for Android. Adapt that to glbasic.
Title: Re: DELETEDIR() function?
Post by: Hark0 on 2012-Oct-22
Well guys, thanks for your answers. ;)


I need of using IMPORT files on IOS, i currently moving my imported files from Inbox folder to another inside /Documents...

I no want to "show" Inbox folder in "Sharing files" on Itunes... then, first I move file, and second delete folder.

I make test with "rm -rf dir".

;)