Custom Commands - Examples

Examples of Custom commands

Set View Filter

Set a filter to determine which files and/or folders are visible in the Explorer Panel:

MC.Explorer.SetViewFilter FILTER="*.jpg"
MC.Explorer.SetViewFilter FILTER="*.jpg *.gif *.png *.tiff"

Exclude folders named ".svn":

MC.Explorer.SetViewFilter FILTER="-/.svn"

Select Files and Folders

Select files and/or folders in the Explorer Panel:

MC.Explorer.Selection.Select FILTER="*.jpg *.png"

Run Application

Run an External Application:

MC.Run CMD="Notepad.exe"

Run an Application with Parameters:

MC.Run CMD="Notepad.exe" ARG="C:\myFile.txt"

Run an External Application as Administrator:

MC.Run CMD="Notepad.exe" ADMIN

Let Windows decide how the file should be opened. In the example below, Windows will open it in your default browser:


Run external application with the file in focus as argument:

MC.Run CMD="MyApp.exe" ARG="${focusfilepath}"
MC.Run CMD="MyApp.exe" ARG="-a -f -i:${focusfilepath}"

Pack Files

Pack all files in "D:\MyFiles" using zip into a file named in the target location:

MC.Filesystem.PackFiles FILES="D:\MyFiles\*.*" METHOD="Zip" TARGET="${targetpath}"

Pack all files in "D:\MyFiles" using zip into a file named "" and store the file in the current target location. The date and time will be the date/time at the moment the command is run:

MC.Filesystem.PackFiles FILES="D:\MyFiles\*.*" METHOD="Zip"

Search for Files

Find all *.jpg and *.tiff files in the current source path; do not search in the ".backup" folder; auto-start the search when the command is run;

MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.jpg *.tiff" EXCLUDE=".backup" AUTOSTART