Custom Commands - Examples
Custom Commands Examples demonstrate the practical application of Multi Commander's structured command system through real-world scenarios. These examples showcase how to leverage the Group → Function → Parameter selection system to create powerful automation commands that enhance file management workflows, from simple view filtering to complex file processing operations.
Practical Command Reference
These working examples provide copy-and-paste command syntax for immediate implementation in your Custom Commands. Each example includes the complete command syntax, parameter explanations, and practical usage scenarios to accelerate your Custom Commands mastery and workflow automation.
View Filtering Examples
Control what files and folders are visible in Explorer Panels using view filter commands that dynamically adjust panel content based on file patterns and criteria.
MC.Explorer.SetViewFilter Examples
Basic File Type Filtering
Show Only JPEG Images
MC.Explorer.SetViewFilter FILTER="*.jpg"
Usage: Display only JPEG files in the current panel, hiding all other file types and folders.
Multiple Image Formats
MC.Explorer.SetViewFilter FILTER="*.jpg *.gif *.png *.tiff"
Usage: Show multiple image formats simultaneously using space-separated patterns.
Document Files Filter
MC.Explorer.SetViewFilter FILTER="*.doc *.docx *.pdf *.txt"
Usage: Display common document formats for document management workflows.
Advanced Filtering Techniques
Exclude Specific Folders
MC.Explorer.SetViewFilter FILTER="-/.svn"
Usage: Hide Subversion control folders from view while showing all files and other folders.
Exclude Multiple Folder Types
MC.Explorer.SetViewFilter FILTER="-/.git -/.svn -/node_modules"
Usage: Hide version control and dependency folders in development projects.
Clear All Filters
MC.Explorer.SetViewFilter FILTER=""
Usage: Remove all filters to show all files and folders in the panel.
Filter Syntax Tips
Inclusion: Use standard wildcards (*.ext) to show specific types. Exclusion: Use minus prefix (-/folder) to hide items. Combination: Mix inclusion and exclusion patterns in the same filter.
File Selection Examples
Automate file and folder selection in Explorer Panels using pattern-based selection commands that can target specific file types, date ranges, and size criteria.
MC.Explorer.Selection.Select Examples
Pattern-Based Selection
Select Image Files
MC.Explorer.Selection.Select FILTER="*.jpg *.png"
Usage: Select all JPEG and PNG images in the current panel for batch operations.
Select by Extension Parameter
MC.Explorer.Selection.Select PATTERN="*.${param:0}" SETFOCUS
Usage: Create parameterized command - use "select doc" to select all .doc files.
Select Large Files
MC.Explorer.Selection.Select FILTER="*.*" SIZE=">100MB" SETFOCUS
Usage: Select files larger than 100MB for cleanup or archiving operations.
Advanced Selection Criteria
Select Files Modified Today
MC.Explorer.Selection.Select FILTER="*.*" DATERANGE="TODAY" SETFOCUS
Usage: Select all files modified today for review or backup operations.
Select Old Files for Cleanup
MC.Explorer.Selection.Select FILTER="*.*" DATE="<30d" SETFOCUS
Usage: Select files older than 30 days for archiving or deletion.
Deselect All Files
MC.Explorer.Selection.Deselect FILTER="*.*"
Usage: Clear all current selections to start fresh selection process.
Selection Parameters
SETFOCUS: Moves focus to first selected item. SIZE: Use operators like >100MB, <1KB. DATE: Use relative formats like TODAY, <30d, >1w.
Application Launching Examples
Launch external applications with specific parameters, files, and security settings using MC.Run commands that integrate seamlessly with your system and workflow tools.
MC.Run Application Examples
Basic Application Launching
Launch Notepad
MC.Run CMD="Notepad.exe"
Usage: Open Windows Notepad without any specific file.
Open File in Notepad
MC.Run CMD="Notepad.exe" ARG="C:\myFile.txt"
Usage: Launch Notepad with a specific file already loaded.
Run with Administrator Privileges
MC.Run CMD="Notepad.exe" ADMIN
Usage: Launch application with elevated privileges for system file editing.
Dynamic File Integration
Open Focused File in External Editor
MC.Run CMD="MyApp.exe" ARG="${focusfilepath}"
Usage: Pass the currently focused file to any external application.
Application with Complex Arguments
MC.Run CMD="MyApp.exe" ARG="-a -f -i:${focusfilepath}"
Usage: Launch application with multiple command line switches and focused file.
System Shell Integration
MC.Run CMD="http://www.google.com" SHELL
Usage: Use Windows shell to open URLs or files with default applications.
Advanced Application Control
Launch PowerShell in Current Directory
MC.Run CMD="powershell.exe" ARG="-NoExit -Command cd '${sourcepath}'"
Usage: Open PowerShell terminal in the current source panel directory.
Git Client with Repository Path
MC.Run CMD="C:\Program Files\Git\bin\git.exe" ARG="status" WORKDIR="${sourcepath}"
Usage: Run Git commands in the current directory context.
MC.Run Parameters
CMD: Application executable path or name. ARG: Command line arguments. WORKDIR: Working directory. ADMIN: Run as administrator. SHELL: Use system shell.
File Packing Examples
Create archives and compressed files using MC.Filesystem.PackFiles commands with dynamic naming, multiple compression methods, and flexible source selection options.
MC.Filesystem.PackFiles Examples
Basic Archive Creation
Simple ZIP Archive
MC.Filesystem.PackFiles FILES="D:\MyFiles\*.*" METHOD="Zip" TARGET="${targetpath}Backup.zip"
Usage: Pack all files from D:\MyFiles into a ZIP archive named Backup.zip in the target panel location.
Pack Selected Files
MC.Filesystem.PackFiles FILES="${selectedfilepaths}" METHOD="Zip" TARGET="${targetpath}SelectedFiles.zip"
Usage: Create archive from currently selected files in source panel.
7-Zip High Compression
MC.Filesystem.PackFiles FILES="${sourcepath}*.*" METHOD="7z" TARGET="${targetpath}Archive.7z" COMPRESSION="Ultra"
Usage: Create highly compressed 7z archive of all files in source directory.
Dynamic Archive Naming
Timestamp-Based Archive Name
MC.Filesystem.PackFiles FILES="D:\MyFiles\*.*" METHOD="Zip" TARGET="${targetpath}Backup-${date:yyyy-MM-dd}-${time:HH-mm-ss}.zip"
Usage: Create archive with current date and time in filename (e.g., Backup-2024-01-15-14-30-22.zip).
Project-Based Archive
MC.Filesystem.PackFiles FILES="${sourcepath}*.*" METHOD="Zip" TARGET="${targetpath}${sourcefolderame}-${date:yyyyMMdd}.zip"
Usage: Create archive named after source folder with date suffix.
Parameterized Archive Name
MC.Filesystem.PackFiles FILES="${selectedfilepaths}" METHOD="Zip" TARGET="${targetpath}${param:0}.zip"
Usage: Use command parameter for archive name - "pack ProjectBackup" creates ProjectBackup.zip.
Advanced Packing Options
RAR Archive with Password
MC.Filesystem.PackFiles FILES="${selectedfilepaths}" METHOD="RAR" TARGET="${targetpath}Secure.rar" PASSWORD="${param:0}"
Usage: Create password-protected RAR archive using command line parameter.
Exclude Pattern During Packing
MC.Filesystem.PackFiles FILES="${sourcepath}*.*" METHOD="Zip" TARGET="${targetpath}Clean.zip" EXCLUDE="*.tmp *.log"
Usage: Pack all files except temporary and log files.
Compression Methods
Available: Zip, 7z, RAR, TAR, GZIP. Compression Levels: Store, Fast, Normal, Good, Ultra. Features: Password protection, file exclusion, directory preservation.
Search Operations Examples
Execute sophisticated file searches using MC.FileSearch.Search commands with multiple criteria, exclusion patterns, and automated search execution for efficient file discovery.
MC.FileSearch.Search Examples
Basic Search Operations
Search for Image Files
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.jpg *.tiff" AUTOSTART
Usage: Find all JPEG and TIFF images in the current source directory with automatic search execution.
Search with Exclusions
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.jpg *.tiff" EXCLUDE=".backup" AUTOSTART
Usage: Search for image files but exclude any files in folders named ".backup".
Parameterized Search
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.${param:0}" AUTOSTART
Usage: Create flexible search command - use "search mp3" to find all MP3 files.
Advanced Search Criteria
Search by File Size
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.*" SIZE=">100MB" AUTOSTART
Usage: Find all files larger than 100MB in the current directory tree.
Search by Date Range
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.*" DATE="TODAY" AUTOSTART
Usage: Find all files modified today in the source directory.
Content-Based Search
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.txt" CONTENT="${param:0}" AUTOSTART
Usage: Search for text files containing specific content - "textsearch password" finds files with "password".
Complex Search Scenarios
Development File Search
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.cs *.js *.html" EXCLUDE="bin obj node_modules" AUTOSTART
Usage: Search for source code files while excluding build and dependency directories.
Duplicate File Detection
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.*" DUPLICATES="SIZE+DATE" AUTOSTART
Usage: Find potential duplicate files based on size and modification date.
Cross-Drive Search
MC.FileSearch.Search SEARCHIN="C:\ D:\ E:\" SEARCHFOR="*.${param:0}" AUTOSTART
Usage: Search across multiple drives for specific file types.
Search Parameters
SEARCHIN: Directory paths to search. SEARCHFOR: File patterns. EXCLUDE: Folders to skip. AUTOSTART: Begin search immediately. SIZE/DATE: Additional criteria filters.
Tab Management Examples
Control Explorer Panel tabs with commands for creating, managing, and organizing tab layouts to streamline multi-location file management workflows.
Tab Control Examples
Tab Creation and Navigation
Open New Tab with Specific Path
MC.Explorer.NewBrowser PATH="${param:0}" SIDE="SOURCE"
Usage: Create command "newtab C:\Projects" to open new tab with specified path.
Open Target Path in New Tab
MC.Explorer.NewBrowser PATH="${targetpath}" SIDE="LEFT"
Usage: Open current target panel path in new tab on left side.
Switch to Next Tab
MC.SetActiveTab PANEL="ACTIVE" TAB="NEXT"
Usage: Navigate to next tab in current panel - ideal for hotkey assignment.
Advanced Tab Features
Create Locked Tab with Color
MC.Explorer.NewBrowser PATH="${sourcepath}" TABLOCK TABCOLORS="255,0,0,0,1" TABNAME="Important"
Usage: Create locked tab with red background color and custom name.
Close All Tabs Except Locked
MC.CloseAllTabs KEEPLOCKED DONOTASK
Usage: Clean up tab clutter while preserving important locked tabs.
Save Current Tab Layout
MC.SaveTabs FILENAME="${targetpath}${param:0}.tabs"
Usage: Save current tab configuration - "savetabs project" creates project.tabs file.
Tab Management Tips
Color Format: TABCOLORS uses Red,Green,Blue,TextColor,Gradient. Tab States: TABLOCK prevents accidental closure. Layout Saving: Store tab configurations for project-specific workflows.
Advanced Selection Operations
Utilize sophisticated selection commands for complex file management scenarios including folder comparison, color-based selection, and selection memory management.
Advanced Selection Examples
Folder Comparison Operations
Select Duplicate Files Between Panels
MC.Explorer.Selection.CompareFoldersForDuplicates FILES
Usage: Compare source and target panels to identify and select duplicate files.
Select Missing Files in Target
MC.Explorer.Selection.CompareFoldersForMissing FILES
Usage: Select files in source that don't exist in target - perfect for backup verification.
Select Newer Files for Sync
MC.Explorer.Selection.CompareFoldersForNewest FILES
Usage: Select files that are newer in source than target for synchronization operations.
Color-Based and Memory Selection
Select Files by Color Rule
MC.Explorer.Selection.SelectByColor RULE="${param:0}"
Usage: Select files matching specific color rule - "selectcolor Important" selects files colored by "Important" rule.
Save Selection to Memory
MC.Explorer.Selection.SaveSelectionToMemory NAME="${param:0}"
Usage: Store current selection for later use - "savesel backup" stores selection as "backup".
Load Clipboard Selection
MC.Explorer.Selection.LoadSelectionFromClipboard WILDCARD
Usage: Select files based on names copied to clipboard with wildcard matching.
Selection Power Tips
Memory Storage: Save complex selections for reuse across sessions. Color Integration: Combine file coloring rules with selection automation. Comparison Logic: Use folder comparison for synchronization workflows.
Interface Customization Examples
Customize Multi Commander's interface dynamically using commands that control view modes, panel layouts, and visual appearance for optimal workflow adaptation.
Interface Control Examples
View Mode and Layout Control
Switch to Thumbnail View
MC.Explorer.SetViewMode MODE="4"
Usage: Change active panel to thumbnail detail view - ideal for image folders.
Toggle Active Panel
MC.SetActivePanel PANEL="TOGGLE"
Usage: Switch focus between left and right panels quickly.
Synchronize Panel Views
MC.Explorer.Goto PANEL="RIGHT" PATH="${sourcepath}"
Usage: Make both panels show the same directory for comparison.
Visual Customization
Apply Color Profile
MC.Explorer.SetColoringRules NAME="${param:0}"
Usage: Switch color schemes - "colors development" applies development color profile.
Change Column Layout
MC.Explorer.SetColumns NAME="${param:0}"
Usage: Apply predefined column sets - "columns media" shows media-specific columns.
Refresh Coloring Rules
MC.Explorer.RefreshColoringRules
Usage: Update file colors after rule changes or new files.
View Mode Reference
Modes: 1=Detail, 2=List, 3=Thumbnail List, 4=Thumbnail Detail. Panel IDs: LEFT, RIGHT, ACTIVE, SOURCE, TARGET. Profiles: Use predefined color and column profile names.
File Tools Examples
Leverage Multi Commander's built-in file processing tools including checksum verification, picture conversion, and data viewing through automated command execution.
File Processing Examples
Checksum and Verification
Create MD5 Checksum File
MC.CheckSum.Create ALLSELECTED CHECKSUM="MD5" AUTOSTART FILENAME="${targetpath}checksums.md5"
Usage: Generate MD5 checksum file for all selected files in target directory.
Verify File Integrity
MC.CheckSum.Verify FILE="${focusfilepath}"
Usage: Verify checksum file in focus to validate file integrity.
Batch Verify Selected
MC.CheckSum.Verify ALLSELECTED
Usage: Verify all selected checksum files and folders containing checksums.
Picture Processing
Convert Images to JPEG
MC.PictureTools.Convert SELECTED FORMAT="JPG" JPGQUALITY="90"
Usage: Convert all selected images to high-quality JPEG format.
Resize Images for Web
MC.PictureTools.Resize SELECTED WIDTH="800" HEIGHT="*" JPGQUALITY="85"
Usage: Resize selected images to 800px width while maintaining aspect ratio.
Batch Convert with Parameter
MC.PictureTools.Convert SELECTED FORMAT="${param:0}" OVERWRITE
Usage: Convert to specified format - "convert PNG" converts selected images to PNG.
Data Viewing
View File as Hex
MC.DataViewer.View FILE="${focusfilepath}" HEX
Usage: Open focused file in data viewer with hexadecimal display.
View with Auto-Reload
MC.DataViewer.View FILE="${focusfilepath}" AUTORELOAD
Usage: Monitor file changes by viewing with automatic reload enabled.
File Tools Reference
Image Formats: PNG, JPG, GIF, BMP, TIF. Size Syntax: Use * for auto-calculation. Quality: 0-100 for JPEG compression. Checksum Types: CRC32, MD5.
Data Processing Examples
Process text files and manipulate data using Multi Commander's text processing utilities for sorting, find-and-replace operations, and content transformation.
Text Processing Examples
Text File Manipulation
Sort Lines in Text File
MC.Utils.SortLines FILE="${focusfilepath}" TARGET="*_Sorted.*" KEEPBACKUP
Usage: Sort lines in focused text file, creating sorted copy with backup of original.
Sort by Date Column
MC.Utils.SortLines FILE="${focusfilepath}" SORTBY="Item" ITEM="3" SORTAS="Date" ITEMSEP="," OVERWRITE
Usage: Sort CSV file by third column treating values as dates.
Find and Replace Text
MC.Utils.FindAndReplace FILE="${focusfilepath}" FIND="${param:0}" REPLACEWITH="${param:1}" REPLACEALL KEEPBACKUP
Usage: Replace text - "replace oldtext newtext" replaces all occurrences.
Advanced Text Operations
Case-Insensitive Replace
MC.Utils.FindAndReplace FILE="${focusfilepath}" FIND="error" REPLACEWITH="ERROR" IGNORECASE REPLACEALL TARGET="*_Fixed.*"
Usage: Replace "error" with "ERROR" regardless of case, creating new file.
Sort with Natural Numbers
MC.Utils.SortLines FILE="${focusfilepath}" SORTAS="Number" NATRUALNUMORDER REVERSE DELETE
Usage: Sort numbers naturally (1,2,10 instead of 1,10,2) in reverse order.
Extract and Sort Data
MC.Utils.SortLines FILE="${focusfilepath}" SORTBY="SubString" LINEOFFSET="10" SUBSTRLEN="20" TARGET="${targetpath}extracted.txt"
Usage: Sort by substring at position 10 with length 20, useful for fixed-width data.
Text Processing Tips
Backup Safety: Use KEEPBACKUP for important files. Sort Types: Text, Number, Date available. Target Patterns: Use * wildcards for dynamic naming. Encoding: FORCEUTF8 ensures proper character handling.
Implementation and Usage
Transform these examples into working Custom Commands by understanding the implementation process and integration options for maximum workflow efficiency.
How to Use These Examples
Implementation Steps
- Copy Command: Copy the command syntax from any example above
- Create UDC: Open User Defined Commands and create new command
- Select Type: Choose "Custom Commands" as command type
- Paste Syntax: Paste the copied command into the command field
- Modify Parameters: Adjust paths, patterns, or options as needed
- Save Command: Save the command with descriptive name
- Assign Access: Create button, hotkey, or menu item
Customization Tips
- Path Adaptation: Replace static paths with MultiTags for dynamic behavior
- Parameter Usage: Use
${param:0}
for command line flexibility - Pattern Modification: Adjust file patterns for your specific needs
- Option Addition: Add parameters like CONFIRMATION or SETFOCUS
Advanced Combinations
Combining Multiple Commands
- Search and Select: Use search results to select specific files
- Filter and Pack: Apply view filter, then pack visible files
- Select and Launch: Select files by pattern, then launch external app
- MultiScript Integration: Call Custom Commands from MultiScript for complex workflows
Workflow Integration
- Button Panels: Create toolbar buttons for frequently used commands
- Keyboard Shortcuts: Assign hotkeys for instant command execution
- Menu Integration: Add commands to custom menu categories
- Command Line: Create aliases for parameterized commands
Error Prevention
- Path Validation: Test commands with various path scenarios
- Parameter Testing: Verify behavior with different parameter values
- Confirmation Dialogs: Add confirmation for destructive operations
- Backup First: Test new commands on sample data initially
Custom Commands Examples Mastery
Master Custom Commands by starting with these proven examples and adapting them to your specific workflows. Remember that most commands can be enhanced with MultiTags for dynamic behavior, parameters for flexibility, and execution options for safety. Begin with simple examples like view filtering and file selection, then progress to complex operations like automated archiving and multi-criteria searches. These examples provide the foundation for creating powerful workflow automation that transforms Multi Commander into a personalized productivity environment.
Related Documentation
Expand your Custom Commands knowledge with: Custom Commands Guide, Complete Commands List, MultiTags Reference, User Defined Commands Overview, and other command types: Internal Commands, External Commands, MultiScript.