EDIT: I'll leave the question here as the help docs don't mention wildcard escaping, but using [WildcardPattern]::Escape('C:\temp\file[file].txt') works.
On Windows (10) it's valid for file paths to contain square brackets []. eg:
C:\temp\file[file].txt
is valid.
However when I pass this file path to the Powershell Start-BitsTransfer command's -source parameter it either errors (if it's the only file path) or is ignored (if supplied as a string array element).
I suspect it's because of the range operation support:
You can use standard wildcard characters such as the asterisk (*) and the question mark (?). Or, you can use a range operator such as "[a-r]".
And the doc states:
Note
The destination path cannot use wildcard characters. The destination path supports relative directories, root paths, or implicit directories (that is, the current directory). Destination files cannot be renamed by using a wildcard character. Additionally, HTTP and HTTPS URLs do not work with wildcards. Wildcards are only valid for UNC paths and local directories.
However doesn't mention source not supporting wildcards only destination.
How do I pass literal file paths to Start-BitsTransfer that contain square brackets?
PS: I've also tried specifying a specific output path for a given input path containing brackets and still fails.