[Batch] Backup Maken

Pagina: 1
Acties:

  • MetZyZteM
  • Registratie: Mei 2002
  • Laatst online: 01-11-2023
code:
1
2
3
4
5
6
@ECHO OFF
FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET DATE=%%B
echo ----- %DATE%----- >> backup_log.txt
xcopy c:\PTL S:\APPS\PTL\ /S /H /Y /D >> backup_log.txt
echo ---------------------- >> backup_log.txt
exit


Ik wil dus een backup maken van de c drive, naar de S (netwerk mounted drive).
Het probleem is nu dat /D niet echt werkt, hij blijft constant alles overschrijven.

De logfile:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
----- 26-08-2003 ----- 
C:\PTL\Copy (2) of Copy of New Text Document.txt
C:\PTL\Copy (2) of New Text Document.txt
Dit heb ik ff ingekort anders wordt de post wat lang
C:\PTL\tratartar\New Text Document.txt
40 File(s) copied
---------------------- 
----- 26-08-2003 ----- 
C:\PTL\Copy (2) of Copy of New Text Document.txt
Dit heb ik ff ingekort anders wordt de post wat lang
C:\PTL\tratartar\Copy of New Text Document.txt
C:\PTL\tratartar\New Text Document.txt
40 File(s) copied
----------------------


Iemand een idee? Alvast Bedankt,

MetZyZteM

  • curry684
  • Registratie: Juni 2000
  • Laatst online: 12-05 22:23

curry684

left part of the evil twins

Dit is een Windows-batch zo te zien. Batchfiles hebben sowieso al niets met Programming & Webscripting van doen, horen in hun respectievelijke OS-fora.

Deze dus moved naar Windows Operated Systems :z

Professionele website nodig?