Prikazi cijelu temu 03.05.2012 08:03
miro35 Van mreze
Clan
Registrovan od:05.01.2009
Lokacija:-


Predmet:Re: Application.FileSearch Access 2010
Evo ostatak funkcija:
PreuzmiIzvorni kôd (Text):
  1. Function ImeFajla(PutanjaF As String) As String
  2.     '*******************************************
  3.     'Ime:      ImeDir   (Function)
  4.     'Sadržaj: Odvaja ime fajla od putanje
  5.     'Autor:     ZXZ
  6.     'Datum:      09 01, 2010, 11:36:53
  7.     'Adresa: Tuzla BiH
  8.     'Email:     zxz@icentar.ba
  9.     'Ulazni parametri:Putanja
  10.     'Izlazni parametri:Zadnj dir od putanja
  11.     '*******************************************
  12.        Dim X As Integer
  13.         Dim Putanja As String
  14.        
  15.         On Error Resume Next
  16.     Putanja = PutanjaF
  17. Start:
  18.     Do Until Right$(Putanja, 1) = "\"
  19.             Putanja = Left$(Putanja, Len(Putanja) - 1)
  20.      Loop
  21.      ImeFajla = Mid(PutanjaF, Len(Putanja) + 1)
  22.     End Function
  23.     Function Zaustavi(Trajanje)
  24.     Dim VRIJEME
  25.      
  26.     DoEvents
  27.      
  28.     Trajanje = Trajanje + Timer()
  29. Start:
  30.     VRIJEME = Timer()
  31.     If VRIJEME < Trajanje Then GoTo Start
  32.     End Function
  33.     Function BrisiFile(Putanja As String)
  34.     Dim fs
  35.     Dim I As Integer
  36.        
  37.     Set fs = Application.FileSearch
  38.     With fs
  39.         .LookIn = Putanja
  40.         .FileType = 1
  41.         If .Execute > 0 Then
  42.             For I = 1 To .foundfiles.Count
  43.             Kill .foundfiles(I)
  44.             Next I
  45.         End If
  46.     End With
  47.     End Function

Miro