Page 1 of 1

REQ: (Windows) move AVI remove folder

Posted: February 19th, 2009, 10:27 am
by Miller_Heavy
I have been trying to search and program my own script and not getting anywhere, can anybody help.
I would like it to move AVI to parent folder or category folder then remove the folder that the AVI was in.

TIA

Re: REQ: (Windows) move AVI remove folder

Posted: February 19th, 2009, 11:29 am
by markus101
This will simply move the files to it's parent directory, but it will not rename them.

Code: Select all

cd /D "%1"
move *.avi ..

echo "move complete"
-Markus

Re: REQ: (Windows) move AVI remove folder

Posted: February 20th, 2009, 8:48 pm
by Miller_Heavy
I think I figured out what I wanted.

Code: Select all

@echo off
cd /D "%1"
ren *.avi %1.avi
move *.avi ..
cd ..
rd /S /Q %1