Windows 7 Backup Favourites and Desktop via GPO

Posted on 2011-09-22
Medium Priority
Last Modified: 2012-06-27
How can I backup Windows 7 Favourites and Desktop files via a GPO? Thank you.
Question by:CMilne
  • 2
  • 2
  • 2
  • +1

Expert Comment

ID: 36581067
You can use a batch script to save the favorites and desktop files via GPO

@echo off

set backuppath = "\\Server\Share\"
set userpath = "C:\Users\%USERNAME%"

:: Create new folders into the backup path
md "%backuppath%\%USERNAME%"
md "%backuppath%\%USERNAME%\Favourites"
md "%backuppath%\%USERNAME%\Desktop"

:: Copy all user data into Backup folder
xcopy /K/R/E/I/S/C/H/Y "%userpath%\Desktop\*.*"  "%backuppath%\%USERNAME%\Desktop\*.*"
xcopy /K/R/E/I/S/C/H/Y "%userpath%\Favorites\*.*"  "%backuppath%\%USERNAME%\Favourites\*.*"


Open in new window

You only have to replace
set backuppath = "\\Server\Share\"
set backuppath = Your Place for Backup
LVL 66

Expert Comment

ID: 36581501
Have you considered Folder Redirection?

Folder Redirection feature in Windows

Author Comment

ID: 36583042
win7expert, will the batch file remove files from the backup drive if we removed files from the laptops 'Desktop' or 'Favorites'?
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Expert Comment

ID: 36584959
No it doesn't

for deleting the files inside both directorys, you have to add the following lines to the Script:

:: Delete all files and folders on the desktop and the favourites
del "%userpath%\Desktop\*.*"
del "%userpath%\Favorites\*.*"

Open in new window


Author Comment

ID: 36964541
Not quite what I was looking for. I need folders to be synced. Thanks for your help.
LVL 66

Accepted Solution

johnb6767 earned 1000 total points
ID: 36966481
K, synched is different than "backed up" as in your title/question....

Built in synch...

Configuring New Offline Files Features for Windows 7 Computers Step-by-Step Guide

Addin, can be used as a logon/startup script.

Synctoy 2.1
LVL 59

Expert Comment

ID: 37187490
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question