
." Copy the SRC file to the DST file" cr
." and replace all occurances of  OLD string  by  NEW string"  cr
."   DST file is encoded in  UTF-8  format" cr
."  2025-10-26" cr




: crlf" ( -- c-addr, u )
  0x0d char>"
  0x0a char>"  Join"
;



s" EditReplace"  sob.window=new value myWindow

      12
      s"                                   "
      sob.edit.multi=new value si-report
      
      
      : report ( c-addr , u -- )
      si-report sob.item=add drop
         crlf"  si-report sob.item=add drop
      
 ;
 
 si-report sob=empty
 
 
 
: process ( c-addr , u -- )

report
; 
 
 
 
 : dirDelete ( c-addr , u -- )
  file.find=open   dup
  begin                \ enter loop with ( search-id, search-id ) 
      dup -1 =   0=    \ test for no file found  (search-id, bool)
    while              \ jumps over the repeat if  bool  is zero/false
      dup              \ search-id  search-id 
      file.found@name  \ get name of found file (search-id, c-addr, u)  
      2dup report 
      delete-file  drop        \ display name (search-id)
      file.find=next   \ go get next file (a new search-id)
  repeat
                       \ search-id  -1
  drop file.find=close \ give search resources back !
;
s" C:\Users\george\Desktop\pwScripter\widgets - cpp\Amalgamation" 
dirDelete
   
 
 //
 \\
 
 
: dir ( c-addr , u -- )
  file.find=open   dup
  begin                \ enter loop with ( search-id, search-id ) 
      dup -1 =   0=    \ test for no file found  (search-id, bool)
    while              \ jumps over the repeat if  bool  is zero/false
      dup              \ search-id  search-id 
      file.found@name  \ get name of found file (search-id, c-addr, u)  
      process          \ display name (search-id)
      file.find=next   \ go get next file (a new search-id)
  repeat
                       \ search-id  -1
  drop file.find=close \ give search resources back !
;
   s" *.h"    dir  
  s" *.cpp"  dir     
 
 