|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Clearing contents of multiple Users Home foldersI work in a school and as part of the summer tidy up I need to clear ALL
contents from all Student Home drives (H:). I need to retain all folders so I cant just delete all users within a folder. The structure is as follows: folder called 1999 - contains subfolders that are a list of users folder called 2000 - contains subfolders that are a list of users 2001 2002.....and so on. Can anyone advise an automated way to delete the contents of these folders rather than manually having to enter each one and deleting that way ? If so, it will save me hours of work. Thanks in advance, Assuming you're on latest OS the following cmdline will delete all files in
the folder tree leaving the folder structure in place, please test before you start deleting the production file structure. del /S *.* /Q for help on this command type del /? Regards SimonE ---------------------------------------------------------------------------- This posting is provided "as is" with no warranties and confers no rights Show quoteHide quote "M_Hood" wrote: > I work in a school and as part of the summer tidy up I need to clear ALL > contents from all Student Home drives (H:). I need to retain all folders so I > cant just delete all users within a folder. The structure is as follows: > folder called 1999 - contains subfolders that are a list of users > folder called 2000 - contains subfolders that are a list of users > 2001 > 2002.....and so on. > > Can anyone advise an automated way to delete the contents of these folders > rather than manually having to enter each one and deleting that way ? If so, > it will save me hours of work. > > Thanks in advance, Thanks Simon,
Yes - I am using Server 2003 SP1. I will attempt this and get back to you with the results ! Show quoteHide quote "SimonE" wrote: > Assuming you're on latest OS the following cmdline will delete all files in > the folder tree leaving the folder structure in place, please test before you > start deleting the production file structure. > > del /S *.* /Q > > for help on this command type del /? > > Regards > > SimonE > > ---------------------------------------------------------------------------- > This posting is provided "as is" with no warranties and confers no rights > > > "M_Hood" wrote: > > > I work in a school and as part of the summer tidy up I need to clear ALL > > contents from all Student Home drives (H:). I need to retain all folders so I > > cant just delete all users within a folder. The structure is as follows: > > folder called 1999 - contains subfolders that are a list of users > > folder called 2000 - contains subfolders that are a list of users > > 2001 > > 2002.....and so on. > > > > Can anyone advise an automated way to delete the contents of these folders > > rather than manually having to enter each one and deleting that way ? If so, > > it will save me hours of work. > > > > Thanks in advance, I am having problems doing this with my Partitioned drive. The student data
is on the G: partition but when I try to access this on a cmd prompt it just keeps returning to the E: drive, the default in other words. Any advice appreciated !!!! Show quoteHide quote "SimonE" wrote: > Assuming you're on latest OS the following cmdline will delete all files in > the folder tree leaving the folder structure in place, please test before you > start deleting the production file structure. > > del /S *.* /Q > > for help on this command type del /? > > Regards > > SimonE > > ---------------------------------------------------------------------------- > This posting is provided "as is" with no warranties and confers no rights > > > "M_Hood" wrote: > > > I work in a school and as part of the summer tidy up I need to clear ALL > > contents from all Student Home drives (H:). I need to retain all folders so I > > cant just delete all users within a folder. The structure is as follows: > > folder called 1999 - contains subfolders that are a list of users > > folder called 2000 - contains subfolders that are a list of users > > 2001 > > 2002.....and so on. > > > > Can anyone advise an automated way to delete the contents of these folders > > rather than manually having to enter each one and deleting that way ? If so, > > it will save me hours of work. > > > > Thanks in advance, Grateful if you can give me details of the commands you're entering once
you've opened a command prompt. entering "g:" should get you to the desired drive. Show quoteHide quote "M_Hood" wrote: > I am having problems doing this with my Partitioned drive. The student data > is on the G: partition but when I try to access this on a cmd prompt it just > keeps returning to the E: drive, the default in other words. > > Any advice appreciated !!!! > > > > "SimonE" wrote: > > > Assuming you're on latest OS the following cmdline will delete all files in > > the folder tree leaving the folder structure in place, please test before you > > start deleting the production file structure. > > > > del /S *.* /Q > > > > for help on this command type del /? > > > > Regards > > > > SimonE > > > > ---------------------------------------------------------------------------- > > This posting is provided "as is" with no warranties and confers no rights > > > > > > "M_Hood" wrote: > > > > > I work in a school and as part of the summer tidy up I need to clear ALL > > > contents from all Student Home drives (H:). I need to retain all folders so I > > > cant just delete all users within a folder. The structure is as follows: > > > folder called 1999 - contains subfolders that are a list of users > > > folder called 2000 - contains subfolders that are a list of users > > > 2001 > > > 2002.....and so on. > > > > > > Can anyone advise an automated way to delete the contents of these folders > > > rather than manually having to enter each one and deleting that way ? If so, > > > it will save me hours of work. > > > > > > Thanks in advance, Simon, thanks again. I dont know what is going on with either me, or the
Server but it is now working as it should. I have completed removal of files from the first batch of users and pleased to report that everything has gone to plan. My only slight concern is that the folders within the Users Home directory remain, although this is not too pressing. I have had a look on the del /? options but cant see any mention of how to remove the subfolders. Would be grateful if you could advise, otherwise thankyou very much for your help today. Show quoteHide quote "SimonE" wrote: > Grateful if you can give me details of the commands you're entering once > you've opened a command prompt. > entering "g:" should get you to the desired drive. > > "M_Hood" wrote: > > > I am having problems doing this with my Partitioned drive. The student data > > is on the G: partition but when I try to access this on a cmd prompt it just > > keeps returning to the E: drive, the default in other words. > > > > Any advice appreciated !!!! > > > > > > > > "SimonE" wrote: > > > > > Assuming you're on latest OS the following cmdline will delete all files in > > > the folder tree leaving the folder structure in place, please test before you > > > start deleting the production file structure. > > > > > > del /S *.* /Q > > > > > > for help on this command type del /? > > > > > > Regards > > > > > > SimonE > > > > > > ---------------------------------------------------------------------------- > > > This posting is provided "as is" with no warranties and confers no rights > > > > > > > > > "M_Hood" wrote: > > > > > > > I work in a school and as part of the summer tidy up I need to clear ALL > > > > contents from all Student Home drives (H:). I need to retain all folders so I > > > > cant just delete all users within a folder. The structure is as follows: > > > > folder called 1999 - contains subfolders that are a list of users > > > > folder called 2000 - contains subfolders that are a list of users > > > > 2001 > > > > 2002.....and so on. > > > > > > > > Can anyone advise an automated way to delete the contents of these folders > > > > rather than manually having to enter each one and deleting that way ? If so, > > > > it will save me hours of work. > > > > > > > > Thanks in advance, RD or rmdir will do that job, but removes the toplevel directory as well,
which is not what I understand you would want, best way is to manually delete... Simon Show quoteHide quote "M_Hood" wrote: > Simon, thanks again. I dont know what is going on with either me, or the > Server but it is now working as it should. > > I have completed removal of files from the first batch of users and pleased > to report that everything has gone to plan. My only slight concern is that > the folders within the Users Home directory remain, although this is not too > pressing. I have had a look on the del /? options but cant see any mention of > how to remove the subfolders. Would be grateful if you could advise, > otherwise thankyou very much for your help today. > > "SimonE" wrote: > > > Grateful if you can give me details of the commands you're entering once > > you've opened a command prompt. > > entering "g:" should get you to the desired drive. > > > > "M_Hood" wrote: > > > > > I am having problems doing this with my Partitioned drive. The student data > > > is on the G: partition but when I try to access this on a cmd prompt it just > > > keeps returning to the E: drive, the default in other words. > > > > > > Any advice appreciated !!!! > > > > > > > > > > > > "SimonE" wrote: > > > > > > > Assuming you're on latest OS the following cmdline will delete all files in > > > > the folder tree leaving the folder structure in place, please test before you > > > > start deleting the production file structure. > > > > > > > > del /S *.* /Q > > > > > > > > for help on this command type del /? > > > > > > > > Regards > > > > > > > > SimonE > > > > > > > > ---------------------------------------------------------------------------- > > > > This posting is provided "as is" with no warranties and confers no rights > > > > > > > > > > > > "M_Hood" wrote: > > > > > > > > > I work in a school and as part of the summer tidy up I need to clear ALL > > > > > contents from all Student Home drives (H:). I need to retain all folders so I > > > > > cant just delete all users within a folder. The structure is as follows: > > > > > folder called 1999 - contains subfolders that are a list of users > > > > > folder called 2000 - contains subfolders that are a list of users > > > > > 2001 > > > > > 2002.....and so on. > > > > > > > > > > Can anyone advise an automated way to delete the contents of these folders > > > > > rather than manually having to enter each one and deleting that way ? If so, > > > > > it will save me hours of work. > > > > > > > > > > Thanks in advance, I would have done this a little differently.
I would have said, go to the drive, cd to the folder that holds all the users directories and done a DIR /b >> usershome.txt Then use the text file to build a looping batch file or use it as a list to run a a script to then wipe out sub directories and files. I am sure if you check with the scripting newsgroup they could be more succinct than I am being. Show quoteHide quote "SimonE" <Sim***@discussions.microsoft.com> wrote in message news:0952778A-4B4C-4A48-940F-6A1A854683C7@microsoft.com... > RD or rmdir will do that job, but removes the toplevel directory as well, > which is not what I understand you would want, best way is to manually > delete... > > Simon > > "M_Hood" wrote: > >> Simon, thanks again. I dont know what is going on with either me, or the >> Server but it is now working as it should. >> >> I have completed removal of files from the first batch of users and >> pleased >> to report that everything has gone to plan. My only slight concern is >> that >> the folders within the Users Home directory remain, although this is not >> too >> pressing. I have had a look on the del /? options but cant see any >> mention of >> how to remove the subfolders. Would be grateful if you could advise, >> otherwise thankyou very much for your help today. >> >> "SimonE" wrote: >> >> > Grateful if you can give me details of the commands you're entering >> > once >> > you've opened a command prompt. >> > entering "g:" should get you to the desired drive. >> > >> > "M_Hood" wrote: >> > >> > > I am having problems doing this with my Partitioned drive. The >> > > student data >> > > is on the G: partition but when I try to access this on a cmd prompt >> > > it just >> > > keeps returning to the E: drive, the default in other words. >> > > >> > > Any advice appreciated !!!! >> > > >> > > >> > > >> > > "SimonE" wrote: >> > > >> > > > Assuming you're on latest OS the following cmdline will delete all >> > > > files in >> > > > the folder tree leaving the folder structure in place, please test >> > > > before you >> > > > start deleting the production file structure. >> > > > >> > > > del /S *.* /Q >> > > > >> > > > for help on this command type del /? >> > > > >> > > > Regards >> > > > >> > > > SimonE >> > > > >> > > > ---------------------------------------------------------------------------- >> > > > This posting is provided "as is" with no warranties and confers no >> > > > rights >> > > > >> > > > >> > > > "M_Hood" wrote: >> > > > >> > > > > I work in a school and as part of the summer tidy up I need to >> > > > > clear ALL >> > > > > contents from all Student Home drives (H:). I need to retain all >> > > > > folders so I >> > > > > cant just delete all users within a folder. The structure is as >> > > > > follows: >> > > > > folder called 1999 - contains subfolders that are a list of users >> > > > > folder called 2000 - contains subfolders that are a list of users >> > > > > 2001 >> > > > > 2002.....and so on. >> > > > > >> > > > > Can anyone advise an automated way to delete the contents of >> > > > > these folders >> > > > > rather than manually having to enter each one and deleting that >> > > > > way ? If so, >> > > > > it will save me hours of work. >> > > > > >> > > > > Thanks in advance,
Other interesting topics
NT Backup on Server 2003 Generates DCOM error EventID: 10005
NIC naming problem.... sc.exe? How to disable security warning in W2k3 SP1? Server/Domain upgrade 2000->2003 Event log errors during boot up Problems with Automated Deployment Services Sending Network Messages?? cannot open scheduled tasks after installing Windows 2003 SP1 After loading SP1 on 2003 IE will not load |
|||||||||||||||||||||||