Pull video files from folders

Discuss and share scripts and script files...
Post Reply
Dan Panke
Posts: 1
Joined: 05 Mar 2014 12:57

Pull video files from folders

Post by Dan Panke »

This script will pull video files out of selected folders and move them up a level in the tree.

Code: Select all

$a = get("SelectedItemsPathNames", "|");
 foreach($b, $a, "|") {
 $c = folderreport("files", "r", $b, "r", , "|");
 if(strpos($c, ".avi", , 0) != -1) { moveto "<curpath>", "$b\*.avi", , 1; }
 if(strpos($c, ".mp4", , 0) != -1) { moveto "<curpath>", "$b\*.mp4", , 1; }
 if(strpos($c, ".mkv", , 0) != -1) { moveto "<curpath>", "$b\*.mkv", , 1; }
 if(strpos($c, ".mpg", , 0) != -1) { moveto "<curpath>", "$b\*.mpg", , 1; }
 if(strpos($c, ".mpeg", , 0) != -1) { moveto "<curpath>", "$b\*.mpeg", , 1; }
 }
 msg "Done!";

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: Pull video files from folders

Post by Enternal »

Oh this is pretty nifty! Although personally I would be too lazy to sit and write, debug, and test that code when I would just simply do a search for all those files and then cut and paste. "So easy that a cave man could do it!" :lol:

Anyway thanks!

Post Reply