Just wondering if anyone can help me. Normally I'm pretty got at finding some code I need an to manipulate it but horrible if I have to start from scratch.
I'm a teacher and want to have all the files labelled consistently as I have to send them off.
What I want to know is there a way to write a batch file to do the following:
I have a subject folder and in each subject folder I have the students name, booklet they are doing in a folder and then there is the file either a .doc or .docx.
I want the batch file to rename the file to what ever it was to Subject_Book#_Name.doc or .docx
My Documents/Subject/Student/Book 1/.doc
\Math A\Jim Book\Book 1 Addition\Addition Booklet.docx
\Math A\Jim Book\Book 2 Subtraction\Subtraction Booklet.docx
Into
\Math A\Jim Book\Book 1 Addition\Math A_Addition Booklet_Jim Book.docx
\Math A\Jim Book\Book 2 Subtraction\Math A_Subtraction Booklet_Jim Book.docx
\Math A\Frank Sims\Book 1 Addition\Addition Booklet.docx
\Math A\Frank Sims\Book 2 Subtraction\Subtraction Booklet.docx
Into
\Math A\Frank Sims\Book 1 Addition\Math A_Addition Booklet_Frank Sims.docx
\Math A\Frank Sims\Book 2 Subtraction\Math A_Subtraction Booklet_Frank Sims.docx
Now I don't mind if I have to copy the bat file into each folder of if some amazing person can help me out and have it in the main subject folder.
I did see something like this somewhere else, but this would still take a lot of time.
title Rename Bat
echo This bat must be in the folder that
echo contains the files to be renamed.
echo Enter File Name
set /p old=
echo Enter New Name
set /p new=
ren "%old%" "%new%"
echo Done
pause```