move folders containing a string

30 views Asked by At

I have a folder with several hundred subfolders. I want to move all those where the folder name includes the string "moc"

I tried this:

 move C:\Users\andre_000\Documents\THE UPLOAD\2015-06\2015-06
-08\WIP\Shared WIP\AU2_SP_OforC\*moc*.* C:\Users\andre_000\Documents\THE UPLOAD\
2015-06\2015-06-08\WIP\Shared WIP\AU2_SP_OforC

but I get an error that the commmand syntax is wrong

1

There are 1 answers

2
beingalex On

Wrap THE UPLOAD in quotes:

  C:\Users\andre_000\Documents\"THE UPLOAD"\2015-06\2015-06
  -08\WIP\Shared WIP\AU2_SP_OforC\*moc*.* C:\Users\andre_000\Documents\"THE UPLOAD"\
  2015-06\2015-06-08\WIP\Shared WIP\AU2_SP_OforC