Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I want to archive my CD-roms and find the back in a excel spreadsheet. Does
anyone know how to read directory structure from disk and import them into axcel? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Jaggie,
Assuming your CD drive is D, this will list all files on the active sheet. Sub FindCDFiles() With Application.FileSearch .NewSearch .LookIn = "D:\" .SearchSubFolders = True .FileType = msoFileTypeAllFiles If .Execute(msoSortOrderDescending) 0 Then MsgBox "There were " & .FoundFiles.Count & " file(s) found." For i = 1 To .FoundFiles.Count Cells(i, 1).Value = .FoundFiles(i) Cells(i, 2).Value = FileDateTime(.FoundFiles(i)) Cells(i, 3).Value = FileLen(.FoundFiles(i)) Next i Else MsgBox "There were no files found." End If End With End Sub HTH, Bernie MS Excel MVP "Jaggie" wrote in message ... I want to archive my CD-roms and find the back in a excel spreadsheet. Does anyone know how to read directory structure from disk and import them into axcel? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print Directory to Excel | Excel Discussion (Misc queries) | |||
Searching Excel Directory | Excel Discussion (Misc queries) | |||
Excel and Active Directory | Excel Discussion (Misc queries) | |||
list directory in EXCEL | Excel Discussion (Misc queries) | |||
read a column of names and place a number in the next cell | Excel Discussion (Misc queries) |