Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default File List Creation

Hello,

I'm trying to find a way to create a file list.
Right now I go to "dos" and do a dir *.txt list.txt
and then strip out by hand what I dont' need bytes dates etc.

Is there a way to do this in excel using vb

thanks
rob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default File List Creation

Yes, but I might use DOS anyway. Use DIRs /b (bare) switch.

Try DIR *.txt list.txt /b or DIR *.txt list.txt /b/s if you want to list
the full path and/or search subdirectories.

--
Bob Kilmer

"robert" wrote in message
...
Hello,

I'm trying to find a way to create a file list.
Right now I go to "dos" and do a dir *.txt list.txt
and then strip out by hand what I dont' need bytes dates etc.

Is there a way to do this in excel using vb

thanks
rob




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default File List Creation

Rob

Try this

Sub ListFiles()

Dim FName As String
Dim i As Long

i = 1
FName = Dir("c:\Dick\*.txt")

Do While Len(FName) 0
ActiveSheet.Cells(i, 1).Value = FName
FName = Dir
i = i + 1
Loop

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"robert" wrote in message
...
Hello,

I'm trying to find a way to create a file list.
Right now I go to "dos" and do a dir *.txt list.txt
and then strip out by hand what I dont' need bytes dates etc.

Is there a way to do this in excel using vb

thanks
rob




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
list creation Darrell_Sarrasin via OfficeKB.com Excel Discussion (Misc queries) 2 December 18th 08 01:22 AM
List Creation from Static tab gary Excel Worksheet Functions 5 January 3rd 08 06:43 AM
*.tmp file creation in Excel Yvonne Excel Discussion (Misc queries) 3 July 8th 07 12:58 PM
Would Like to Automate Batch File Creation and Text FIle Import socrtwo Excel Discussion (Misc queries) 2 August 18th 06 03:54 PM
drop down list creation swesa Excel Discussion (Misc queries) 1 April 16th 05 12:38 AM


All times are GMT +1. The time now is 05:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"