Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Killing files
#12
(06-05-2025, 12:23 PM)PhilOfPerth Wrote:
(06-05-2025, 11:18 AM)PhilOfPerth Wrote:
(06-05-2025, 09:30 AM)RhoSigma Wrote: Jesus Christ boys, where do you live?

KILL "path/POP*" and be done with it.

The problem with both of these is that the character after POP varies for each file. Kill "path/POP* doesn't accept the * - it doesn't like the * and returns File Not Found.

(06-05-2025, 08:43 AM)bplus Wrote: or more QBistically and less DOS like:

If Ucase$(Left$(filename$, 3)) = "POP" Then Kill filename$

Sorry bplus, I missed your suggestion. I'll give that a go now. Thanks

 Thanks all. With bits from each of the help responses, I was able to modify the kill process to work. 
There was an additional part to the problem: the "POP" section could be anything, so the path might be for example RecallHist/EDWARD2, so the position of the name within the string is variable, as well as the end character. I fixed it with this line (where HistString$ is the path, and Name$ was previously entered as POP, or EDWARD etc.):
      If Mid$(HistString$, 12, Len(Name$)) = Name$ Then kill HistString$
The amount of help, as usual, was incredible, and much appreciated.
            



  MY Suggestion on using the Shell command *WILL* work with wildcards as well.
Reply


Messages In This Thread
Killing files - by PhilOfPerth - 06-05-2025, 04:16 AM
RE: Killing files - by ahenry3068 - 06-05-2025, 04:29 AM
RE: Killing files - by SMcNeill - 06-05-2025, 05:40 AM
RE: Killing files - by bplus - 06-05-2025, 08:43 AM
RE: Killing files - by RhoSigma - 06-05-2025, 09:30 AM
RE: Killing files - by OldMoses - 06-05-2025, 10:41 AM
RE: Killing files - by PhilOfPerth - 06-05-2025, 11:18 AM
RE: Killing files - by PhilOfPerth - 06-05-2025, 12:23 PM
RE: Killing files - by ahenry3068 - 06-05-2025, 12:57 PM
RE: Killing files - by ahenry3068 - 06-05-2025, 11:13 AM
RE: Killing files - by Kernelpanic - 06-05-2025, 12:14 PM
RE: Killing files - by RhoSigma - 06-05-2025, 12:21 PM
RE: Killing files - by Pete - Yesterday, 09:48 PM



Users browsing this thread: 1 Guest(s)