file list into a database? (1 Viewer)

dgoulston

Hasn't Got A Clue
Local time
Today, 01:57
Joined
Jun 10, 2002
Messages
403
i was wondering if it was possible to put a list of files(from windows explorer or win media player 7.1) into a text file or a database... becasue i have 600+ mp3's and want to put them into a database without having to type them all out...

so is this possible

thank you in advance

DAL
 

Travis

Registered User.
Local time
Yesterday, 17:57
Joined
Dec 17, 1999
Messages
1,332
You can use the "DIR" command to loop through files in a Directory and have them Write a record to a Table:


Dim sPath as String
Dim sFile as String
Dim rst as DAO.Recordset

Set rst=Currentdb.OpenRecordset("Select * From [MyMP3Table]")
sPath="C:\My MP3s\"

Do
sFile=Dir(sPath & "*.MP3")
If sFile<>"" Then
rst.AddNew
rst.Fields("MP3PATH")=sPath
rst.Fields("MP3FILENAME")=sFile
rst.Update
End If
Loop While sFile<>""
 

Users who are viewing this thread

Top Bottom