REBOL [Title: "REBOL Renamer"] my_path: copy system/options/path files_data: [] feedback_data: [] do-update-files-data: func [] (1) [ change-dir my_path if exists? %../ [append files_data %../] append files_data sort read my_path ] update-text-list: func [current_list [object!]] (2) [ current_list/sld/data: 0 current_list/sn: 0 current_list/sld/redrag current_list/lc / max 1 length? head current_list/lines show current_list ] do-change-folder: func [selected [file!]] (3) [ test_selection: to-file rejoin [my_path selected] if dir? test_selection [ my_path: copy test_selection lab_path/text: clean-path my_path show lab_path clear files_data do-update-files-data update-text-list list_files ] ] do-rename: func [] (4) [ messages: copy [] foreach file read my_path [ if not dir? file [ if not none? find file fld_search/text [ new-file: to-file replace to-string file fld_search/text fld_replace/text either exists? new-file [ append messages rejoin ["FILENAME " new-file " ALREADY IN USE"] ] [ append messages rejoin ["Renamed " file " to " new-file] rename file new-file ] ] ] ] return messages ] do-go-action: func [] (5) [ clear feedback_data insert feedback_data sort do-rename update-text-list list_feedback clear files_data do-update-files-data update-text-list list_files ] do-update-files-data (6) view layout [ across label "Current Folder:" lab_path: label to-string my_path 300x50 top (7) return list_files: text-list data files_data [do-change-folder value] (8) list_feedback: text-list data feedback_data return label "Search pattern:" fld_search: field return label "Replace pattern:" fld_replace: field return btn_go: button "Go" [do-go-action] (9) btn_quit: button "Quit" [quit] ]