The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Help creating links to multiple MP3 files
Tom Rizzo
post Sep 29 2006, 09:18 AM
Post #1





Group: Members
Posts: 3
Joined: 29-September 06
Member No.: 276



I need to easily create links to almost 200 MP3 files for our sales department. Is there an easy way to import a directory and create generic links to these files? I am currently using DreamWeaver 8, but am not opposed to using something else to make this easier. It would really suck to have to link to each file, one by one.

I'd appreciate any help!

Thanks
Tom
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Sparkyg
post Sep 29 2006, 09:34 AM
Post #2


Member
***

Group: Members
Posts: 46
Joined: 29-September 06
From: Suffolk UK
Member No.: 270



Hi There

A little bit of Script Should do the trick

But first

how are the files named? Random names , (Consecutive Numbers etc)
What does the link text need to be?
Are they on a web server or local?
If a web server is it linux or IIS?

Cheers

Sparky
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Tom Rizzo
post Sep 29 2006, 10:06 AM
Post #3





Group: Members
Posts: 3
Joined: 29-September 06
Member No.: 276



Thie files names are all pretty random. The current files are all sequential, starting at 001_xxxxxx.mp3 and going to 184_xxxx.mp3, but I don't beleive that any future files will follow this naming convention.

The link text can just be the file name for now. We can modify that later if necessary. We are using an IIS server.

Thanks in advance for your help!

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Sparkyg
post Sep 29 2006, 10:33 AM
Post #4


Member
***

Group: Members
Posts: 46
Joined: 29-September 06
From: Suffolk UK
Member No.: 270



Hi Again

Quick and Dirty

save the code below as mp3.vbs, then run it, you may need to change the paths for your mp3 folder, but it will create a text file of links for you.

cheers

Len

'________________________________________________-

' Which directory should I search?

Directory = "c:/MP3S/"



Set FSO = CreateObject("Scripting.FileSystemObject")

Set MyFile = fso.CreateTextFile("c:\links.txt", False)


Set Folder = FSO.GetFolder(Directory)
Set FileList = Folder.Files


for each File in FileList

MyFile.WriteLine("<a href=""" & File.Name & """>" & File.Name & "</A>")
next

MyFile.Close

msgbox("Done")
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Tom Rizzo
post Sep 29 2006, 11:16 AM
Post #5





Group: Members
Posts: 3
Joined: 29-September 06
Member No.: 276



That is so frigging awesome!

Thank you so much!!!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Sparkyg
post Sep 29 2006, 12:07 PM
Post #6


Member
***

Group: Members
Posts: 46
Joined: 29-September 06
From: Suffolk UK
Member No.: 270



No Problem Tom
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
SkyB0lt
post Sep 29 2006, 07:00 PM
Post #7


Novice
**

Group: Members
Posts: 21
Joined: 27-September 06
Member No.: 253



Nice! I am actually going to try this with a link to several pictures I need to post for a family pic site I am goign to put up. ]

Nice script!

You rock!

I'll find a nice pic to upload for you!

Shawn
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Sparkyg
post Sep 30 2006, 02:31 AM
Post #8


Member
***

Group: Members
Posts: 46
Joined: 29-September 06
From: Suffolk UK
Member No.: 270



Thanks Shawn
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 09:34 AM