Jay said:
This only works if the directory is empty and i need it in a script to
remove the local userprofiles of students who have logged on to the machine.
Cause else it eats up all the space on the hard-drive. I work for a school
and on an average day there are 50 logins on every computer. So after 1 week
the computer totally freezes up.
Not quite. When you come across a new command, like the one that Phil gave
you, then you should
start a Command Prompt so that you can explore its properties. You will soon
see that there are some very useful switches:
C:\TEMP>rd /?
Removes (deletes) a directory.
RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path
/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.
/Q Quiet mode, do not ask if ok to remove a directory tree with /S