Welcome to WebmasterWorld Guest from 54.167.5.15

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)



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

jatar_k

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

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



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?

mattglet

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

WebmasterWorld Senior Member 10+ Year Member



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.

CaseyRyan

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

10+ Year Member



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=-

 

Featured Threads

Hot Threads This Week

Hot Threads This Month