Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.windowsxp.general,microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default 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
  #3   Report Post  
Posted to microsoft.public.windowsxp.general,microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read Files from a folder into an Excel drop down list or Combo Box dhstein Excel Discussion (Misc queries) 2 January 16th 09 05:41 PM
Creating a List of the files in a folder in excel [email protected] Excel Discussion (Misc queries) 2 November 27th 06 08:39 PM
List files in a folder gilgil Excel Programming 2 November 23rd 05 02:02 PM
how do i print a list of files in a folder in excel? mikie New Users to Excel 4 June 6th 05 04:27 AM
Getting list of files in a folder to excel Dave Peterson[_3_] Excel Programming 0 July 29th 03 02:47 AM


All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"