06-05-2025, 04:16 AM
(This post was last modified: 06-05-2025, 04:17 AM by PhilOfPerth.)
I have a folder called RecallHist containing several files with names like "ABC4, ABC6, POP1, POP6, AB1, BD3
and I need to delete those that start with POP (for example).
I've written this code, but the selection$ string is not correct - file is not found.
How do I place a Wildcard in the string?
and I need to delete those that start with POP (for example).
I've written this code, but the selection$ string is not correct - file is not found.
Code: (Select All)
Name$ = "POP"
Print "Name$ is "; Name$
NewHist:
k = _KeyHit
_Limit 30
If k <> 21248 Then GoTo NewHist ' wait for Delete key
selection$ = "RecallHist/" + Name$ + "?" ' <----------------------------------- this line is wrong - file is not being found
Print "selection$ is "; selection$
If _FileExists(selection$) Then
Kill selection$ ' delete files in RecallHist that start with POP plus any other char
Print "Killed"; selection$ ' deleted history files for this name
Else
Print "History still intact" ' not deleted
End If
How do I place a Wildcard in the string?
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) 
Please visit my Website at: http://oldendayskids.blogspot.com/

Please visit my Website at: http://oldendayskids.blogspot.com/