Matt_B
Well-Known Member
First, apologies for the title, I couldn't think of a better one.
On our server at school we have a list of folders for each class, Class 1, Class 2 etc and within those I wanted one for each child. I have written a small batch script that cycles through all of the text files in the batch folder which are called Class 1.txt, Class 2.txt etc. Within these files is each child's name on a new line. So far so simple.
The problem will come next September when children move classes. They don't move together, so some of Class 1 will go to Class 3 with some of Class 2 etc. Is there a script that would go through a simple text file or CSV to move them from one folder to another?
ie.
Name Old Class New Class
Child A, 1, 3
Child B, 2, 3
and so on?
I'm thinking something like
xcopy P:\%oldclass%\*.* P:\%newclass%\*.*
My issue is how to get that info from the text file
On our server at school we have a list of folders for each class, Class 1, Class 2 etc and within those I wanted one for each child. I have written a small batch script that cycles through all of the text files in the batch folder which are called Class 1.txt, Class 2.txt etc. Within these files is each child's name on a new line. So far so simple.
The problem will come next September when children move classes. They don't move together, so some of Class 1 will go to Class 3 with some of Class 2 etc. Is there a script that would go through a simple text file or CSV to move them from one folder to another?
ie.
Name Old Class New Class
Child A, 1, 3
Child B, 2, 3
and so on?
I'm thinking something like
xcopy P:\%oldclass%\*.* P:\%newclass%\*.*
My issue is how to get that info from the text file