WHat´s the easiest way to do a "DELETE BLK_*.tmp" in B+ ?

BlitzPlus Forums/BlitzPlus Programming/WHat´s the easiest way to do a "DELETE BLK_*.tmp" in B+ ?

3DBuzzFan(Posted 2003) [#1]
I do not want to invoke any external file.
(.exe nor .bat).
The file name format is BLK_x.tmp where x is a number.
I do not want to go with a loop and check the existence of all files from 0 to 9999, for instance.
In short... is there a way I can use wildcards?
Or even better... how can I get a list of all files in the current directory (the directory which the executable was invoked from)?
Thanks,

Rui arbosa Jr.


semar(Posted 2003) [#2]
Or even better... how can I get a list of all files in the current directory (the directory which the executable was invoked from)?


I think ReadDir command could help you; here's the link:

http://www.blitzbasic.com/bpdocs/command.php?name=ReadDir&ref=goto

To retrieve the current directory, use CurrentDir() command:

http://www.blitzbasic.com/bpdocs/command.php?name=CurrentDir&ref=2d_cat

Sergio.


3DBuzzFan(Posted 2003) [#3]
Hey, thanks Sergio.
/R