HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Software Newsgroups > Windows XP

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-29-2007, 07:50 AM
Khoshravan
Guest
 
Posts: n/a
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
Reply With Quote
Sponsored Links
  #2  
Old 04-29-2007, 11:22 AM
timebird
Guest
 
Posts: n/a
Default RE: Get list of files in a folder in Excel


plz refer the following pdf file:

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

--
msn bonyclyd@msn.com
---------------------------------------------
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 With Quote
  #3  
Old 04-29-2007, 01:30 PM
Joel
Guest
 
Posts: n/a
Default RE: 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 bonyclyd@msn.com
> ---------------------------------------------
> 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 With Quote
Sponsored Links
Fix your Windows Problems - FAST.
FREE Safe Scan Registry Check. Locate & Fix Errors in Minutes!
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT. The time now is 07:32 PM.


Powered by vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger