Link to home
Start Free TrialLog in
Avatar of mce-man-it
mce-man-it

asked on

Clearing desktop of local profile on logoff or restart?

We have several meeting rooms machines which login with the same account. Users drag copies of presentations onto the desktop and dont delete them. We ideally want a way to copy all documents saved on the desktop into a folder on the desktop or to the My Documents folder every time the user logs out or the machine is restarted. Any suggestions?
Avatar of Saoi
Saoi
Flag of United Kingdom of Great Britain and Northern Ireland image

The easiest way would be to use a logoff script, something to the effect of:

@ECHO OFF
ECHO Moving files to My Documents
MOVE %USERPROFILE%\Desktop\*.* "%USERPROFILE%\My Documents\" /y

The /y will overwrite existing files.
ASKER CERTIFIED SOLUTION
Avatar of RubenvdLinden
RubenvdLinden

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RubenvdLinden
RubenvdLinden

Correction, it should be:

move %userprofile%\desktop\*.ppt "%userprofile%\my documents\"
move %userprofile%\desktop\*.doc "%userprofile%\my documents\"


I do not recommend to move *.*, as it will also move all normal shortcuts on the desktops.