Détails des Données

 


Robocopy avec Windows 7 à 11
Tout sauf AppData
robocopy c:\Users\Username e:\Sauvegarde\Username /E /R:0 /W:0 /XA:SH /FFT /A-:SH /XD AppData /XJD

Tout avec un log
robocopy c:\Users\Username e:\Sauvegarde\Username /E /R:0 /W:0 /XA:SH /FFT /A-:SH /XD /XJD /LOG:C: \ Log \ backup_log.txt

MS Outlook emails
robocopy c:\Users\Username\AppData\Local\Microsoft\ Outlook e:\sauvegarde\Username\AppData\local\Microsoft\ outlook /E /R:0 /W:0 /XA:SH /FFT /A-:SH /XJD

Windows Mail messages
robocopy "c:\Users\Username\AppData\Local\Microsoft\Windows Mail" "e:\sauvegarde\Username\AppData\local\Microsoft\Windows Mail" /E /R:0 /W:0 /XA:SH /FFT /A-:SH /XJD


With accents
Add before robocopy: chcp 1252
if it doesn't work with notepad:
try the built-in editor Microsoft WordPad or EditPlus
robocopy might display the wrong character but seems to work
or try
chcp 65001 instead of chcp 1252
robocopy might not display the character but seems to work

In very old systems like Windows XP
if chcp 1252 does not work use the program edit.com (MsDos version ) instead of notepad
typing [alt]+999 to get the accent


Robocopy exemple avec variable pour le disque dur de destination
@echo off
chcp 1252
set destination=M
echo.
echo Sauvegarde des donnees
echo La lettre du disque dur externe est %destination%
echo.
echo Verifiez que le disque dur externe est branche et que sa lettre est %destination%
echo.
pause
robocopy c:\Users\Username %destination%:\Sauvegarde\ Username /E /R:0 /W:0 /XA:SH /FFT /A-:SH /XD AppData /XJD
pause


Robocopy pour sauvegarder vos documents avec Vista
robocopy “c:\Users\Username” “j:\Sauvegarde\Username” /E /R:0 /W:0 /XA:SH /FFT /A-:SH /XD AppData /XJD
robocopy “c:\Users\Username” “j:\Sauvegarde\Username” /E /R:0 /W:0 /XA:SH /FFT /A-:SH /XJD

Robocopy avec Windows XP
robocopy "c:\Documents and Settings\user" "j:\user" /E /R:0 /W:0 /XF NTUSER.DAT /FFT /A-:SH /XD Cookies IECompatCache IETldCache "Temporary Internet Files" Apps Temp Historique PrivacIE SendTo Tracing Windows "Local Settings" UserData "Application Data"

Outlook express email
robocopy "c:\Documents and Settings\user\Local Settings\Application data\Identities" "j:\user\identities" /E /R:0 /W:0 /XF /FFT /A-:SH /XD
Outlook express contacts
robocopy "c:\Documents and Settings\user\application data\microsoft\address book" "j:\user\address_book" /E /R:0 /W:0 /XF /FFT /A-:SH /XD


Robocopy racine du disque dur
robocopy d:\ e:\donnees /E /R:0 /W:0 /XA:SH /FFT /A-:SH /XD /XJD
robocopy source racine peut cacher le dossier de destination
après la première sauvegarde, si besoin:
attrib -s -a -h e:\donnees


Robocopy exemple pour finir en musique
start wmplayer "C:\Windows\Media\town.mid" && timeout 15 && taskkill /im wmplayer.exe
pause
Utile pour connaitre la fin de la sauvegarde


Notes
Redirecting Output Log to a File and Displaying on the Console
robocopy C:\src C:\dst /LOG+:c:\file.log /TEE
/FFT : Assume FAT File Times (2-second date/time granularity)
/A-:SH : Problème des dossiers cachés
attrib -s -a -h d: \ backup_data` pour afficher le dossier caché

To replace "Press on any key to continue..."
echo "Sauvegarde terminée..."
pause > nul
Check for CRLF end of line char existence.

10 second delay:
ping -n 10 127.0.0.1 >nul
The "10" is the value in seconds


keywords: cmd ligne de commande command line bat .bat dos msdos sauvegarde backup

ID 155

Annuler