Empty/Move contents of Server 2008 User\Documents folders.

Soldato
Joined
4 Nov 2007
Posts
4,514
Morning all,

Been using TS/RemoteApps for a while now and the documents folders of all our users are starting to get a little out of hand. All documents are supposed to be saved in our document management system but the documents folder is a temporary holding area for drawings (pdf, dwg, etc) files that don't have an addin to be directly entered into the system ala Word, Excel and Outlook.

I'd like to move all everything in every users documents & downloads folders to another drive (still separated by username) then delete them 24 hours later.

I'm not asking anyone to do my job for me, just need to know what tool you'd use to achieve this!

Robocopy? Powershell? Batch file + scheduled tasks?

Thank you.
 
dir /b >abc.txt

gives you a list of all user profile folders

1) use this + excel to create a batch file to ceate the folders (5mins)
2) use this + excel to create a batch file to copy %userpofile%\my documents and downloads to the folder you created in step 1 (5 mins to create the batch file in xl)

you can probably reain permissions if you use robocopy rather than xcopy in your batch file...

well thats how I would do it, I find excel great for making batch files to do the same thing loads of times...
 
dir /b >abc.txt

gives you a list of all user profile folders

1) use this + excel to create a batch file to ceate the folders (5mins)
2) use this + excel to create a batch file to copy %userpofile%\my documents and downloads to the folder you created in step 1 (5 mins to create the batch file in xl)

you can probably reain permissions if you use robocopy rather than xcopy in your batch file...

well thats how I would do it, I find excel great for making batch files to do the same thing loads of times...

Me too

It's the dumb way of making them though :), I don't know how to make loops so excel is great
 
Wait am I missing something.. why would he need to bother getting a list of dirs?

Source: C:/Users
Destination: D:/New Users

So, why not just do

robocopy "C:/Users" "D:/New Users" /S /MOVE /COPYALL

You can also add this on the end

/XD "C:/Users/Administrator"

If you want to exclude certain folders
 
Back
Top Bottom