Welcome to WebmasterWorld Guest from 54.224.158.39

Forum Moderators: bill

Message Too Old, No Replies

How do I download file names to MS Excel?

How do I download file names to MS Excel?

     

jlhuisingh

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

Inactive Member
Account Expired

 
 


I would like to download file names from a directory to MS Excel.
1:18 am on July 21, 2005 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 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 July 21, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 12, 2002
posts:1482
votes: 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 July 21, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 1, 2004
posts:120
votes: 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.

-=casey=-

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members