Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how do I import a list of music file names into excel

I want to print a list of music files that I have in a folder on my hard
drive. How do I import only the file names into excel?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default how do I import a list of music file names into excel

You need a macro. Change the folder and file extension in the code below

Sub get_files()

Extension = "*.xls"
Folder = "C:\temp"
First = True
RowCount = 1
Do
If First = True Then
FName = Dir(Folder & "\" & Extension)
First = False
Else
FName = Dir()
End If
If FName < "" Then
Range("A" & RowCount) = FName
RowCount = RowCount + 1
End If
Loop While FName < ""

End Sub



"davydahl" wrote:

I want to print a list of music files that I have in a folder on my hard
drive. How do I import only the file names into excel?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how do I import a list of music file names into excel

Several methods to accomplish this.......I like Tushar's best if importing to
Excel.

To add a "Print Directory" feature to Explorer, go to
this KB Article.

http://support.microsoft.com/default...EN-US;q272623&

Or you can download Printfolder 1.2 from.....

http://no-nonsense-software.com/freeware/

I use PF 1.2 and find it to be more than adequate with custom
features.

OR Go to Command prompt and chdir to the folder with the files
Type DIR MYFILES.TXT

All the above create a *.TXT file which can be opened in Notepad and printed.

One more method if you want to by-pass the *.TXT file and pull
directly to Excel is to use Tushar Mehta's Excel Add-in. This allows filtering
and sorting once you have the data in Excel.

http://www.tushar-mehta.com/ scroll down to Add-insDirectory
Listing.

Download the ZIP file and un-zip to your Office\Library folder.


Gord Dibben MS Excel MVP


On Sat, 12 Apr 2008 19:02:00 -0700, davydahl
wrote:

I want to print a list of music files that I have in a folder on my hard
drive. How do I import only the file names into excel?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default how do I import a list of music file names into excel

Gord: What do you think of this change to your code?

@echo off
dir %1 /-p /o:gn "%temp%\Listing.csv"
start excel "%temp%\Listing.csv"
del "%temp%\Listing.csv"
exit

"Gord Dibben" wrote:

Several methods to accomplish this.......I like Tushar's best if importing to
Excel.

To add a "Print Directory" feature to Explorer, go to
this KB Article.

http://support.microsoft.com/default...EN-US;q272623&

Or you can download Printfolder 1.2 from.....

http://no-nonsense-software.com/freeware/

I use PF 1.2 and find it to be more than adequate with custom
features.

OR Go to Command prompt and chdir to the folder with the files
Type DIR MYFILES.TXT

All the above create a *.TXT file which can be opened in Notepad and printed.

One more method if you want to by-pass the *.TXT file and pull
directly to Excel is to use Tushar Mehta's Excel Add-in. This allows filtering
and sorting once you have the data in Excel.

http://www.tushar-mehta.com/ scroll down to Add-insDirectory
Listing.

Download the ZIP file and un-zip to your Office\Library folder.


Gord Dibben MS Excel MVP


On Sat, 12 Apr 2008 19:02:00 -0700, davydahl
wrote:

I want to print a list of music files that I have in a folder on my hard
drive. How do I import only the file names into excel?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default how do I import a list of music file names into excel

The dir has too many options. When excel reads the date it put the data into
multiple cells. This works better

dir %1 /b /o:n "%temp%\Listing.csv"

"Joel" wrote:

Gord: What do you think of this change to your code?

@echo off
dir %1 /-p /o:gn "%temp%\Listing.csv"
start excel "%temp%\Listing.csv"
del "%temp%\Listing.csv"
exit

"Gord Dibben" wrote:

Several methods to accomplish this.......I like Tushar's best if importing to
Excel.

To add a "Print Directory" feature to Explorer, go to
this KB Article.

http://support.microsoft.com/default...EN-US;q272623&

Or you can download Printfolder 1.2 from.....

http://no-nonsense-software.com/freeware/

I use PF 1.2 and find it to be more than adequate with custom
features.

OR Go to Command prompt and chdir to the folder with the files
Type DIR MYFILES.TXT

All the above create a *.TXT file which can be opened in Notepad and printed.

One more method if you want to by-pass the *.TXT file and pull
directly to Excel is to use Tushar Mehta's Excel Add-in. This allows filtering
and sorting once you have the data in Excel.

http://www.tushar-mehta.com/ scroll down to Add-insDirectory
Listing.

Download the ZIP file and un-zip to your Office\Library folder.


Gord Dibben MS Excel MVP


On Sat, 12 Apr 2008 19:02:00 -0700, davydahl
wrote:

I want to print a list of music files that I have in a folder on my hard
drive. How do I import only the file names into excel?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how do I import a list of music file names into excel

If I want a listing, I use Tushar's add-in.

Feel free to add any options to the DIR command.

Gord

On Sat, 12 Apr 2008 21:25:00 -0700, Joel wrote:

Gord: What do you think of this change to your code?

@echo off
dir %1 /-p /o:gn "%temp%\Listing.csv"
start excel "%temp%\Listing.csv"
del "%temp%\Listing.csv"
exit

"Gord Dibben" wrote:

Several methods to accomplish this.......I like Tushar's best if importing to
Excel.

To add a "Print Directory" feature to Explorer, go to
this KB Article.

http://support.microsoft.com/default...EN-US;q272623&

Or you can download Printfolder 1.2 from.....

http://no-nonsense-software.com/freeware/

I use PF 1.2 and find it to be more than adequate with custom
features.

OR Go to Command prompt and chdir to the folder with the files
Type DIR MYFILES.TXT

All the above create a *.TXT file which can be opened in Notepad and printed.

One more method if you want to by-pass the *.TXT file and pull
directly to Excel is to use Tushar Mehta's Excel Add-in. This allows filtering
and sorting once you have the data in Excel.

http://www.tushar-mehta.com/ scroll down to Add-insDirectory
Listing.

Download the ZIP file and un-zip to your Office\Library folder.


Gord Dibben MS Excel MVP


On Sat, 12 Apr 2008 19:02:00 -0700, davydahl
wrote:

I want to print a list of music files that I have in a folder on my hard
drive. How do I import only the file names into excel?




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
How do I import a list of names into a separate form that prints . Paul Smith Excel Worksheet Functions 1 October 8th 05 07:22 PM
Import file names S.G.Pillai Excel Discussion (Misc queries) 4 September 28th 05 04:11 PM
how do i import a file list in to excel liam Excel Discussion (Misc queries) 1 June 25th 05 11:16 PM
Import file names into cells craigwojo Excel Worksheet Functions 0 November 3rd 04 02:59 AM
Import file names into cells craigwojo Excel Worksheet Functions 2 November 2nd 04 11:19 PM


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

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

About Us

"It's about Microsoft Excel"