Solved Copy file into a folder in students area in school

December 15, 2013 at 10:38:04
Specs: Windows 7
Hi I was wondering how would I code a batch script to enable me to copy a file from my area into a selection of students folders within school.
I have access to all of the students areas and want it in a specific folder as they seem to struggle to copy and paste to the correct area.

Thanks


See More: Copy file into a folder in students area in school

Report •


#1
December 15, 2013 at 12:01:51
for /f "tokens=*" %%G in ('dir /b /s /a:d "C:\school\students*"') do echo c:\file.txt %%G\file.txt

might be a good place to start, after you are happy replace the echo with copy. On another note, there is probably an easy method with robocopy, if you haven't considered it.

::mike


Report •

#2
December 15, 2013 at 12:18:21
Hi sorry for sounding like an idiot but im very new to this

So if i had the file in c:\thefile\thedoc.doc
An the students usernames are on z drives
An ive got a list of usernames

SCH001
SCH004
Etc
Not all one after each other and i wanted it in the homework folder
So z:\SCH001\homework

Thanks alot


Report •

#3
December 15, 2013 at 17:33:54
✔ Best Answer
for /f "tokens=*" %%G in ('dir /b /s /a:d "z:\*"') do echo c:\thefile\thedoc.doc %%G\homework

may work

::mike


Report •

Related Solutions


Ask Question