The following is an example:
If there are these files in the folder foo1, ..., foo9, foo10, ..., foo278, if using
rename foo foo0 foo?
Then it will only rename the files from foo1 to foo9 to foo01 to foo09, because the wildcard can only replace a single character, so the renamed file is only a file with a 4-character length name, and the foo in the file name is replaced with foo0.
Continue to use
rename foo foo0 foo??
Then all files from foo01 to foo99 in the folder are renamed to foo001 to foo099, while foo100 and its subsequent file names remain unchanged. Because of the use of wildcard characters?, only files with 5 characters length names are renamed, and foo in the file name is replaced with foo0.
If you continue to use
rename foo foo0 foo*
Then all files from foo001 to foo278 are renamed to foo0001 to foo0278. Because the wildcard * can replace multiple characters, all files starting with foo are renamed, and foo in the file name is replaced with foo0.
Let's look at the usage of the wildcard character [charset], or continue to use the following command in the folder mentioned above
rename foo0 foo foo0[2]*
Then all files from foo0200 to foo0278 are renamed to foo200 to foo278, and foo0 in the file name is replaced with foo.
In use, the three wildcard characters can be used together, and the specific usage is only for yourself to constantly explore.