Command-Line Interface: CopyFilenamesCL
CopyFilenamesCL is a command-line tool that provides CopyFilenames functionality from the terminal, PowerShell, batch scripts, or any automation pipeline. It processes file and folder paths and outputs formatted text according to saved CopyFilenames commands.
This tool requires a CopyFilenames Pro license.
Usage
CopyFilenamesCL [-c <command_name>] [-utf8|-utf16|-utf32|-ansi] [path ...]
CopyFilenamesCL -l
CopyFilenamesCL -h
Options
| Option | Description |
|---|---|
-c <command_name> |
Apply a saved CopyFilenames command to format the output |
-l |
List all available saved CopyFilenames command names |
-utf8 |
Output as UTF-8 (this is the default) |
-utf16 |
Output as UTF-16 |
-utf32 |
Output as UTF-32 |
-ansi |
Output as ANSI using the current system code page |
-h, --help, -? |
Show usage information |
path ... |
One or more file/folder paths to process |
Input
- Command-line arguments: Pass one or more file/folder paths directly. Wildcards (
*and?) are supported and expanded automatically. - Standard input (stdin): If no paths are given on the command line, CopyFilenamesCL reads paths from stdin, one per line (UTF-8 encoded). This allows piping from other commands.
Output
- Without
-c: outputs just the filename portion of each path (one per line) - With
-c <command_name>: applies the named command's formatting (parts, separators, sort order, etc.) to the input paths and outputs the result
Examples
List available commands:
Copy filenames from specific files:
Apply a saved command to all .txt files in a folder:
Pipe paths from another command:
Output as UTF-16:
Notes
- Only one encoding option can be specified at a time
-cand-lcannot be used together- Paths are resolved to absolute paths before processing
- Available on both x64 and ARM64
- The tool uses the same license as the main CopyFilenames application — no separate license purchase is needed
If no valid Pro license is found, the tool exits with:
"Error: A CopyFilenames Pro license is required to use this tool."