Listing files from your computer

SLiDE

New Member
Joined
Apr 15, 2004
Messages
6
I'm not very proficient with Excel, but I am attempting compile a list of files from my computer into a spreadsheet but I am not sure how to get the list in the first place--I have searched many, many websites and everyone directed me here...I would be greatful if anyone could help.

thanx, Jason
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
No...I have folders of graphic files and I want to catalog them in excel so I can keep track of them when I back them up--so, I want to somehow get a list of files from my computer so I can import it into excel. What I am not sure about is how I can get that list of files in a format that excel will accept.
 
Upvote 0
SLiDE said:
I have folders of graphic files and I want to catalog them in excel so I can keep track of them when I back them up--so, I want to somehow get a list of files from my computer so I can import it into excel. What I am not sure about is how I can get that list of files in a format that excel will accept.
So is this for all folders? Anything on your C drive? I'm asking these quations again to maybe narrow down what and where you want to list the file names. If they are graphic files is there a particular file type suffix, sich as gif or jpg or bmp? I assume you want to list the file names, but you telling us what type of files to look for and where to look for them would go a long way for someone to provide you an answer you can use.
 
Upvote 0
Specifically, I have files zipped that I would like to list in one column in Excel; such as...

I just need to get a list of the zip files into excel--somehow I need to be able to "create a list of files" from a directory on my computer that I can specify.

in column A

file01.zip
file02.zip
graphic01.zip
art08.zip

and so on...

basically so I may sort them or put notes next to them for printing purposes.

sorry I wasn't very specific in my last post.
 
Upvote 0
SLiDE said:
Specifically, I have files zipped that I would like to list in one column in Excel; such as...
--somehow I need to be able to "create a list of files" from a directory on my computer that I can specify.
Well, you can take care of the folder specification issue yourself by creating a folder path and then going into WinZip and extracting the zipped files to that folder path. Let's say you name the folder path on your C drive as Your \ Folder \ Path \ . The following macro will look at that path and list all the filenames in it into column A, with a bolded header in cell A1 to remind you what that path is:


Sub Test1()
Application.ScreenUpdating = False
Columns(1).Clear
Dim i As Long, F As String
F = " C: \ Your \ File \ Path \ "
With Range("A1")
.Value = "Files in " & F & ":"
.Font.Bold = True
End With
With Application.FileSearch
.NewSearch
.LookIn = F
.SearchSubFolders = False
.filename = "*.*"
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Cells(i + 1, 1).Value = .FoundFiles(i)
Next i
End If
End With
Columns(1).AutoFit
Application.ScreenUpdating = True
End Sub

Note, remove the extra spaces in this line:
F = "C: \ Your \ File \ Path \ "

Even though I disabled HTML on this post, the web plays tricks with those characters and really there should be no spaces in that Path string.
 
Upvote 0
Sorry everyone--it didn't work but I apreciate all of the help. Maybe I have to look for an external program to put my files in a text format first.

Thanx again.
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top