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


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
 
Ad

Advertisements

J

James Whitlow

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"))
 
Ad

Advertisements

E

Esra Sdrawkcab

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top