Scripting Engine
Built-in script engine with a rich command set, control flow, a visual block editor, syntax highlighting, autocomplete, and AI script generation.
Overview
Brutal Copy 2 includes a built-in scripting engine with a .bcs file format. Write automation using a straightforward command-based syntax with variables (set), control flow, and a broad command library. Run scripts from the GUI script console, complete with a debugger, profiler, and step-through execution.
Commands by Category
The command library is organised by category:
- File Operations:
copy,move,list,count,info,exists,delete,rename,ensuredir,removedir,compare,find - Enumeration:
listfiles,listdirs,find-empty,find-large,analyze - Checksum:
checksum,verify-checksum,verify-copy - Content:
replace-text,convert-encoding,convert-ext - Metadata:
get-size,get-timestamps,set-timestamps,get-attributes,set-attributes - Logging:
log-info,log-warn,log-error,log-debug,start-log,end-log - Filtering:
filter-ext,filter-name,filter-size,filter-date,file-contains - Path:
path-combine,get-filename,get-extension,get-parent,get-fullpath - Utility:
set,echo,pause,exit,timestamp,guid,measure,sleep,call,include
Control Flow
Full control-flow keywords provide real programming capability: if, else, elseif, end, foreach, while, switch, case, default, try, catch, finally, function, break, continue, return.
Use foreach to iterate over files in a directory, try/catch for error handling, and function to define reusable subroutines.
Visual Block Editor
Prefer a no-code approach? The visual block editor lets you drag command blocks onto a canvas, connect them with control flow, and edit properties in a side panel. Blocks are colour-coded by category and support collapse/expand and undo/redo.
The block editor syncs bidirectionally with the text editor — changes in one view appear in the other. Toggle it from the script toolbar.
Editor, Debugger & AI
The code editor provides syntax highlighting with colour-coded tokens and autocomplete for commands and switches. A built-in debugger supports breakpoints and step over / into / out, with a variable inspector, watch expressions, and a per-command profiler.
The Generate from AI button turns a plain-English description into a validated .bcs script. Configure the provider, model, and API key in Settings > AI.