homepage Welcome to WebmasterWorld Guest from 54.211.201.65
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Microsoft / Deprecated - Microsoft Windows OS (XP/NT/Vista)
Forum Library, Charter, Moderators: bill

Deprecated - Microsoft Windows OS (XP/NT/Vista) Forum

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




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

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

 

jatar_k




msg:1571485
 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?

mattglet




msg:1571486
 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.

CaseyRyan




msg:1571487
 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.

-=casey=-

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Deprecated - Microsoft Windows OS (XP/NT/Vista)
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