pupils's directories from a teacher.txt in teacher directory

  • Thread starter Thread starter Pascal
  • Start date Start date
P

Pascal

Hello every body from a newbie

I am a teacher in primary school in Normandy and try to find a solution to
this problem :
Each year i have to create several directories : one per teacher and in each
teacher's directory i have to create one directory for each pupil of
thiseacher's
classroom
There are 8 teachers and about 180 pupils in my school so it's very long to
do it !!!
Do you know any script able to do that job ?
for information i am under win 98 and xp too
actually the pupils list is stored in a txt file where the name of the text
file is the name of the teacher
thank you
pascal
 
Pascal said:
Hello every body from a newbie

I am a teacher in primary school in Normandy and try to find a solution to
this problem :
Each year i have to create several directories : one per teacher and in
each
teacher's directory i have to create one directory for each pupil of
thiseacher's
classroom
There are 8 teachers and about 180 pupils in my school so it's very long
to
do it !!!
Do you know any script able to do that job ?
for information i am under win 98 and xp too
actually the pupils list is stored in a txt file where the name of the
text
file is the name of the teacher
thank you
pascal

Copy the batch code below, save it to something like 'Teachers.bat' &
customize the two 'Set' lines at the top for your directories.

@echo off
Set TextFilesDir=R:\Teachers TXT
Set TeachersDir=R:\Teacher Dirs

for /f "tokens=*" %%a in ('dir /b "%TextFilesDir%"') do (
for /f "tokens=*" %%b in ('Type "%TextFilesDir%\%%a"') do (
md "%TeachersDir%\%%~na\%%b"))
 
James said:
Copy the batch code below, save it to something like 'Teachers.bat' &
customize the two 'Set' lines at the top for your directories.

@echo off
Set TextFilesDir=R:\Teachers TXT
Set TeachersDir=R:\Teacher Dirs

for /f "tokens=*" %%a in ('dir /b "%TextFilesDir%"') do (
for /f "tokens=*" %%b in ('Type "%TextFilesDir%\%%a"') do (
md "%TeachersDir%\%%~na\%%b"))
Unfortunately this (/f) is extended behaviour, and wasn't included in W98.

I'd suggest running the above on one XP machine and then copy the
structure to each other PC.
 
Back
Top