homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Microsoft / Microsoft Windows OS (XP/NT/Vista/Windows 7/8/9/10)
Forum Library, Charter, Moderators: bill

Microsoft Windows OS (XP/NT/Vista/Windows 7/8/9/10) Forum

How do I download file names to MS Excel?
How do I download file names to MS Excel?

 12:51 am on Jul 21, 2005 (gmt 0)

I would like to download file names from a directory to MS Excel.



 1:18 am on Jul 21, 2005 (gmt 0)

Welcome to WebmasterWorld jlhuisingh,

I am not quite sure what you need. Do you mean you just want the list of filenames in a spreadsheet? Are these files on your computer or an a server somewhere?


 2:15 am on Jul 21, 2005 (gmt 0)

You're probably going to need to get familiar with some programming. In ASP, you can use FileSystemObject to loop through the files in a specified directory, store the names in an array, and output the results as a CSV (which is essentially an Excel doc.


 2:06 pm on Jul 21, 2005 (gmt 0)

If I understand what you're trying to do correctly, You can use the dos command "dir".

From the command line, change to the directory that you want to get the files for.
Then type the following command:
dir /A-D /B >> C:\files.csv

The "/A-D" will exclude any directories that exist in that folder.
The "/B" will output the data as a bare format, meaning file names only.
The ">> C:\files.csv" will pipe the output of that data to a new file.

You can open the csv in excel.

If you want to do all the files in all the subdirectories you can throw a /S in the arguments, it will display the full paths of the files as well.

Another really cool command I forgot about in dos is "tree" command. It just looks cool but doesn't have anything to do with your question. :)

Anyway, hope that solves your problem.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft Windows OS (XP/NT/Vista/Windows 7/8/9/10)
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved