Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / May 2008

Tip: Looking for answers? Try searching our database.

import filenames

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
driller - 22 May 2008 09:16 GMT
I have a hell of work updating the list of filenames located in one folder.
The folder contains different file name ext.
The files stored in this folder increased every week.

Can I do importing the filenames and filedates to excel ?How?

thanks in advance

Signature

regards,

Joel - 22 May 2008 11:56 GMT
Use this macro

Sub getdates()
  Folder = "C:\temp"
  Set fso = CreateObject _
     ("Scripting.FileSystemObject")

  Set Folder = _
     fso.GetFolder(Folder)
 
  RowNumber = 1
  'folder size in bytes
  On Error GoTo 200
     For Each fl In Folder.Files
        Sheets(1).Cells(RowNumber, "C") = fl.DateLastModified
        Sheets(1).Cells(RowNumber, "B") = fl.Size
        Sheets(1).Cells(RowNumber, "A") = strFolder & fl.Name
        RowNumber = RowNumber + 1
     Next fl

200   On Error GoTo 0

End Sub

> I have a hell of work updating the list of filenames located in one folder.
> The folder contains different file name ext.
[quoted text clipped - 3 lines]
>
> thanks in advance
driller - 22 May 2008 14:48 GMT
i will try this. and return back after some test...thanks and i'll post back.
Signature

regards,

> Use this macro
>
[quoted text clipped - 27 lines]
> >
> > thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.