Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export file name list viewed in Windows XP Explorer to Excel rows

Status
Not open for further replies.

pvirsf

Technical User
Aug 30, 2004
35
US
Does anyone know of a means to export a list of file names with extensions in a particular folder under Windows XP, to an Exel spreadsheet or text file....one file name per row or text line? I.E. you would be converting a folder listing of file names viewed in Windows Explorer, to data records in Excel. Thks in advance.
 
Molby answered this question in April 04 with this simple macro for Excel.
Directory = "C:\Windows\"
x=1
Cells(x,1) = "Filename"
x=x+1
fil=Dir(Directory,7)
cells(x,1)=fil
do while fil<>""
fil=Dir
If fil<>"" then
x=x+1
Cells(x,1)=fil
End if
Loop

It worked great. Thanks Molby!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top