Scripting Engine
Built-in script engine with 75+ commands across 15 categories, a visual block editor, syntax highlighting, and autocomplete for automating file operations.
Overview
Brutal Copy 2 includes a built-in scripting engine with a .bcs file format. Write automation scripts using a straightforward command-based syntax with variables (set), control flow, and 75+ commands. Scripts can be run from the GUI console, the CLI (brutalcopy script backup.bcs), or queued for batch execution.
Commands by Category
All 75+ commands organised by category:
- File Operations (12):
copy,move,list,count,info,exists,delete,rename,ensuredir,removedir,compare,find - Enumeration (6):
listfiles,listdirs,find-empty,find-large,find-duplicates,analyze - Checksum (3):
checksum,verify-checksum,verify-copy - Content (3):
replace-text,convert-encoding,convert-ext - Metadata (7):
get-size,get-timestamps,set-timestamps,get-attributes,set-attributes,get-owner,list-streams - Logging (7):
log-info,log-warn,log-error,log-debug,set-loglevel,start-log,end-log - Filtering (6):
filter-ext,filter-name,filter-size,filter-date,file-contains,file-matches - Archive (4):
zip,unzip,gzip,gunzip - Tool (4):
hash,sync,wipe,queue - Network (2):
http-get,http-post - Event (2):
watch,retry - Path (5):
path-combine,get-filename,get-extension,get-parent,get-fullpath - Utility (11):
set,echo,pause,exit,timestamp,guid,measure,sleep,popup,call,include - System (3):
wait,cls,help
Control Flow
16 control-flow keywords provide full 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 and drop 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, undo/redo (50 states), and comments.
The block editor syncs bidirectionally with the text editor — changes in one view appear instantly in the other. Open it from the script console toolbar.
Syntax Highlighting & Autocomplete
The text editor provides full syntax highlighting with colour-coded tokens: keywords (amber), commands (blue), variables (purple), strings (green), comments (green), switches (orange), and numbers (teal). Autocomplete suggests commands and switches as you type, triggered automatically after a short debounce delay.