DeleteFile

Blitz3D Forums/Blitz3D Programming/DeleteFile

Graphics 1024,768,32,2
CreateDir "ThisIsAJoke"
filout=WriteFile("ThisIsAJoke\ItsNotThe1stofApril.txt")
WriteLine filout,"ComeOffItGuys"
CloseFile filout

While FileType("ThisIsAJoke\ItsNotThe1stofApril.txt")=0
Wend

If FileType("ThisIsAJoke\ItsNotThe1stofApril.txt")=1
	Print "The File is there"
Else
	Print "Sorry - No File"
EndIf

If FileType("ThisIsAJoke\ItsNotThe1stofApril.txt")=1
	DeleteFile "ThisIsAJoke\ItsNotThe1stofApril.txt"
	Print "Deleted file ThisIsAJoke\ItsNotThe1stofApril.txt"
EndIf

While FileType("ThisIsAJoke\ItsNotThe1stofApril.txt")=1
Wend

If FileType("ThisIsAJoke\ItsNotThe1stofApril.txt")=1
	Print "The File is there"
Else
	Print "Sorry - No File"
EndIf

If FileType("ThisIsAJoke")=2
	DeleteDir "ThisIsAJoke"
EndIf

If FileType("ThisIsAJoke")=2
	Print "The Dir is there"
Else
	Print "Sorry - No Dir"
EndIf

Print
Print "Hit Mouse"

WaitMouse()
End


You want to tell this doesn't work?
This Forum is on a good way to become a Punch and Judy show ...


Just look at those threads:
Error Opening/Closing File
Crash when leaving Screensaver
DeleteFile
Get File in String
array problam(i think so)
Save heightmap from Mesh-terrain.. Please help..

Its all in the wrong place ... Beginners is one Forum above ...

Chalky wrote:
The same things happens in Blitz Basic 2D. Can anyone please tell me what I am doing wrong? :o(

If you would have provided your complete relevant code, we could have told you what you're doing wrong...
One thing's for sure ... it's your program what's wrong ... nothing else!
.