Prikazi cijelu temu 09.06.2012 21:38
zxz Na mrezi
Administrator
Registrovan od:03.02.2009
Lokacija:Tuzla


Predmet:Backup sa zipom
PreuzmiIzvorni kôd (Visual Basic):
  1. Function Bekap()
  2. Dim StaroIme As String
  3. Dim NovoIme As String
  4. Dim Ime As String
  5. Dim Putanja As String
  6.  
  7. On Error GoTo Kraj
  8. StaroIme = ImeBaze
  9. Putanja = PutanjaB
  10. NovoIme = Year(Date) & Format(Month(Date), "mm") & Format(Day(Date), "dd")
  11. NovoIme = Putanja & "backup\" & NovoIme & ".zip"
  12. Shell Putanja & "Pkzip " & NovoIme & " " & StaroIme
  13. MsgBox "Rezervna kopija baze zapisana na putanji." & vbCr & NovoIme
  14. Exit Function
  15. Kraj:
  16. GreskaB (Err.Number)
  17. End Function
  18.  
  19. Function ImeBaze()
  20. Dim Ime As String
  21.  
  22. Ime = CurrentDb.Name
  23.  
  24. Do Until Right$(Ime, 1) = "."
  25. Ime = Left$(Ime, Len(Ime) - 1)
  26. Loop
  27. Ime = Left$(Ime, Len(Ime) - 1)
  28. ImeBaze = Ime & "_be.mdb"
  29. End Function
  30.  
  31. Function PutanjaB()
  32. Dim Putanja As String
  33.  
  34. Putanja = CurrentDb.Name
  35.  
  36. Do Until Right$(Putanja, 1) = "\"
  37. Putanja = Left$(Putanja, Len(Putanja) - 1)
  38. Loop
  39. PutanjaB = Putanja
  40. End Function


Prilozi:
zip.zip
Preuzimanja:301
Velicina datoteke:69.33 KB


Podrška samo putem foruma, jer samo tako i ostali imaju koristi od toga.
Ovaj post je ureden 1 puta. Posljednja izmjena 15.06.2012 09:31 od strane zxz.