In Bash I can move a directory without know the full directory name like so:
mv gradle-*/ gradle/
How do I do this in cmd
(i.e. batch file, not powershell).
The move
command doesn't seem to allow this.
In Bash I can move a directory without know the full directory name like so:
mv gradle-*/ gradle/
How do I do this in cmd
(i.e. batch file, not powershell).
The move
command doesn't seem to allow this.
MOVE only moves 1 dir to another location and therefore doesn't bother expanding wildcards. Unlike Unix where the shell expands wildcards on Windows each command has to do it by itself which leads to all sorts of differing behaviour between commands.
You can use the FOR command to simulate this.
FOR in it's various variants behaves somewhat like "find . -name "wildcard" -exec {} " on Unix.
FOR /d %%i IN (gradle-*) DO move %%i gradle\%%i