I have a lot of pdf files in a directory.
I want to extract file names and file sizes in excel or access.
Can you advise me any tool or code to do above task.
Please also tell, If this can be done in Frontpage.
I have a lot of pdf files in a directory.
I want to extract file names and file sizes in excel or access.
Can you advise me any tool or code to do above task.
Please also tell, If this can be done in Frontpage.
try
Sub FindFiles()
mypath = "c:\a"
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
With Application.FileSearch
.NewSearch
.LookIn = mypath
.SearchSubFolders = True 'False
.MatchTextExactly = False
.filename = ".xls"
If .Execute(msoSortOrderDescending) > 0 Then
'MsgBox "There were " & .FoundFiles.Count & " file(s) found."
For i = 1 To .FoundFiles.Count
If Mid(.FoundFiles(i), Len(mypath) + 1, 2) <> " " Then
Cells(i + lastrow, 1).Value = FileLen(.FoundFiles(i))
'Cells(i + lastrow, 2).Value = FileDateTime(.FoundFiles(i))
Cells(i + lastrow, 3).Value = Right(.FoundFiles(i), _
Len(.FoundFiles(i)) - Len(mypath) - 1)
End If
Next i
Else
MsgBox "There were no files found."
End If
End With
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
--
Don Guillett
SalesAid Software
[email protected]
"zahid" <[email protected]> wrote in
message news:[email protected]...
>
> I have a lot of pdf files in a directory.
> I want to extract file names and file sizes in excel or access.
> Can you advise me any tool or code to do above task.
> Please also tell, If this can be done in Frontpage.
>
>
> --
> zahid
> ------------------------------------------------------------------------
> zahid's Profile:
> http://www.excelforum.com/member.php...o&userid=31250
> View this thread: http://www.excelforum.com/showthread...hreadid=509238
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks