Skip to main content
edited title
Source Link
ttt
  • 209
  • 3
  • 5

Best would be using a .bat file. But could also be Powershell if it's easier.

I was tryingNow I'm using something likethis:

movefor C/r "M:\parentDirectory\subDirectory\*.\movies\new\" %%x in (*.mp4) Cdo move "%%x" "M:\parentDirectory\movies\new\"

but this moves the filesworks only fromfor one sub-directoryextension (. I want to move from all sub-directoriesmp4). How could I do this for multiple extensions?

Best would be using a .bat file. But could also be Powershell if it's easier.

I was trying using something like:

move C:\parentDirectory\subDirectory\*.* C:\parentDirectory

but this moves the files only from one sub-directory. I want to move from all sub-directories.

Best would be using a .bat file. But could also be Powershell if it's easier.

Now I'm using this:

for /r "M:\movies\new\" %%x in (*.mp4) do move "%%x" "M:\movies\new\"

but this works only for one extension (.mp4). How could I do this for multiple extensions?

edited title
Link
ttt
  • 209
  • 3
  • 5

How to move all video files in all sub-directory to a parent directory?

Source Link
ttt
  • 209
  • 3
  • 5

How to move all files in all sub-directory to a parent directory?

Best would be using a .bat file. But could also be Powershell if it's easier.

I was trying using something like:

move C:\parentDirectory\subDirectory\*.* C:\parentDirectory

but this moves the files only from one sub-directory. I want to move from all sub-directories.