ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get list of files in a folder in Excel (https://www.excelbanter.com/excel-programming/388352-get-list-files-folder-excel.html)

Khoshravan

Get list of files in a folder in Excel
 
I am not sure if this newsgroup is the right place to ask this question. If
it is not, please guide me to a proper one.

I have a series of paper (in pdf format) inside a folder.
I would like to prepare a directory of these papers in an Excel (or Access)
file and add some data, like title of paper (obtained from inside the file)
number of page, file size (Kb).
Now I do it manually by pressing (F2 key), getting the file name, copy/paste
into excel and checking the page number visually and again copy/paste which
is very time consuming.


Is there any share/freeware to do this job for me? Is there any easy Macro
to write in Windows to do this job?
Any help/suggestion is appreciated.


--
Rasoul Khoshravan Azar
Kobe University, Kobe, Japan

timebird

Get list of files in a folder in Excel
 

plz refer the following pdf file:

http://www.adobe.com/devnet/acrobat/...JavaScript.pdf

--
msn
---------------------------------------------
the best time to plant a tree was twenty years ago.
the second best time, is today - Chinese proverb



"Khoshravan" wrote:

I am not sure if this newsgroup is the right place to ask this question. If
it is not, please guide me to a proper one.

I have a series of paper (in pdf format) inside a folder.
I would like to prepare a directory of these papers in an Excel (or Access)
file and add some data, like title of paper (obtained from inside the file)
number of page, file size (Kb).
Now I do it manually by pressing (F2 key), getting the file name, copy/paste
into excel and checking the page number visually and again copy/paste which
is very time consuming.


Is there any share/freeware to do this job for me? Is there any easy Macro
to write in Windows to do this job?
Any help/suggestion is appreciated.


--
Rasoul Khoshravan Azar
Kobe University, Kobe, Japan


joel

Get list of files in a folder in Excel
 
If you want to do it in excel this works. Change Mydir to match your
directory. macro gets filename and filesize and put them in column a and b.

Sub pdfsize()

Dim FileSize As Long
Mydir = "c:\temp"

RowCount = 1
First = True
Do While (1)

If First = True Then
MyFilename = Dir(Mydir + "\*.pdf")
First = False
Else
MyFilename = Dir
End If

If MyFilename = "" Then Exit Do

Cells(RowCount, "A") = MyFilename
FileSize = FileLen(Mydir + "\" + MyFilename)
Cells(RowCount, "B") = FileSize
RowCount = RowCount + 1
Loop

End Sub

"timebird" wrote:


plz refer the following pdf file:

http://www.adobe.com/devnet/acrobat/...JavaScript.pdf

--
msn
---------------------------------------------
the best time to plant a tree was twenty years ago.
the second best time, is today - Chinese proverb



"Khoshravan" wrote:

I am not sure if this newsgroup is the right place to ask this question. If
it is not, please guide me to a proper one.

I have a series of paper (in pdf format) inside a folder.
I would like to prepare a directory of these papers in an Excel (or Access)
file and add some data, like title of paper (obtained from inside the file)
number of page, file size (Kb).
Now I do it manually by pressing (F2 key), getting the file name, copy/paste
into excel and checking the page number visually and again copy/paste which
is very time consuming.


Is there any share/freeware to do this job for me? Is there any easy Macro
to write in Windows to do this job?
Any help/suggestion is appreciated.


--
Rasoul Khoshravan Azar
Kobe University, Kobe, Japan



All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com