hoi,
ik ben bezig om een macro te schrijven om ftp files binnen te halen, eerst probeer ik om de directory te zien.
nu heb ik een stukje gemaakt om files in een excell document te zetten en nu heb ik datzelfde stukje gebruikt voor de ftp alleen begrijpt hij dat niet echt.
Set fs = Application.FileSearch
With fs
.LookIn = ftp
.Filename = Filename
If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 65000 Then
MsgBox "There were " & .FoundFiles.Count & " file(s) found. This more than Excel can handle. Please decrease the number of days"
GoTo einde
Else
For i = 1 To .FoundFiles.Count
Sheets("ftp").Select
Cells(i, 1).Value = .FoundFiles(i)
Cells(i, 2).Value = FileDateTime(.FoundFiles(i))
Next i
End If
End With
waar dan
Dim ftp
Dim filename
ftp = "ftp.mcafee.com/pub/antivirus/datfiles/4.x"
filename = "*.*"
maar telkens komt hij met de directory waar het excel bestandje in zit.
(hij zal wel niet met die . overweg kunnen )
iemand een idee
ik ben bezig om een macro te schrijven om ftp files binnen te halen, eerst probeer ik om de directory te zien.
nu heb ik een stukje gemaakt om files in een excell document te zetten en nu heb ik datzelfde stukje gebruikt voor de ftp alleen begrijpt hij dat niet echt.
Set fs = Application.FileSearch
With fs
.LookIn = ftp
.Filename = Filename
If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 65000 Then
MsgBox "There were " & .FoundFiles.Count & " file(s) found. This more than Excel can handle. Please decrease the number of days"
GoTo einde
Else
For i = 1 To .FoundFiles.Count
Sheets("ftp").Select
Cells(i, 1).Value = .FoundFiles(i)
Cells(i, 2).Value = FileDateTime(.FoundFiles(i))
Next i
End If
End With
waar dan
Dim ftp
Dim filename
ftp = "ftp.mcafee.com/pub/antivirus/datfiles/4.x"
filename = "*.*"
maar telkens komt hij met de directory waar het excel bestandje in zit.
(hij zal wel niet met die . overweg kunnen )
iemand een idee