Public Sub ScanFav()
Dim Jdx As Long
Dim DirName As String, FullFileName As String
DirName = Environ("USERPROFILE") & "\Favoris" [green]' Don't know your folder name[/green]
With Application.FileSearch
.LookIn = DirName
.FileName = "*.url"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
For Jdx = 1 To .FoundFiles.Count
FullFileName = .FoundFiles(Jdx)
MsgBox FullFileName & vbCrLf & getWebAddress(FullFileName)
'Add URL processing code here.......
Next Jdx
Else
MsgBox "No files were found in this directory", vbInformation
End If
End With
End Sub
Public Function getWebAddress(urlFileName As String) As String
Dim InputData As String, i As Integer
Open urlFileName For Input As #1
Do While Not EOF(1)
Line Input #1, InputData
i = InStr(InputData, "URL=")
If i > 0 Then
getWebAddress = Mid(InputData, i + 4)
Exit Do
End If
Loop
Close #1
End Function