move video files from one location to another

May 24, 2011 at 14:47:50
Specs: Windows 7
I am no good at programming it simply has just been too long since i've done any.

I am looking for a .bat file that will preform the following:

when run will take all *.wmv and *.avi files in a folder and all sub-folders (lets call the root C:\test)
and move them to a different folder (lets call it C:\test2)

i am looking for a move to be done not a copy as i want to eliminate the need for a delete of the original. also it is important that it can check for sub-folders up to multiple levels deep inside the root folder.

Thank you for the help this has puzzled me for some time and i appreciate any information.

See More: move video files from one location to another

Report •

May 27, 2011 at 00:19:25
i didn't find a bat script, but you could just as well use a Powershell script to do the same thing.

from the top of your post (where your username is) it states that you have windows 7, if you do you already have powershell installed. add the following code to a txt file and rename it "something.PS1" then right click the file and choose run with powershell

$source=read-host "root folder for all files to move"
$dest=read-host "where to put all the files?"
$files=read-host "filetypes? (seperate with comma and space, example: *.avi, *.txt, *.wmv)"

Get-Childitem $source -recurse -include $files | move-item -dest $dest

if this is something you do often you could change the $ variables with a definite string (instead of $files enter "*.avi, *.wmv" in the last linewithout the quotes. and remove the $files from the top)

i just like making my scripts work with anything, universal.

hope you understand what i mean :)


Report •
Related Solutions

Ask Question