Connecting Tech Pros Worldwide Forums | Help | Site Map

File details

Jaez
Guest
 
Posts: n/a
#1: Oct 19 '07
I am trying to make my website produce a podcast for itunes with a number of
item entries and I could really do with help with the following
practicalities.


1) How can I determine from my webpage if a particular file exists on the
server.
In VB 6 I would have used something like Set fp =
CreateObject("Scripting.FileSystemObject"): If fp.FileExists....

I need something like
If fp.FileExists(http://mysite.com/files/thisfile.mp3) Then


2) Assumeing that the file exists then I need to know its length in bytes so
I can add this information to my podcast XML file

3) I now have my basic XML file template for this file type in an SQL
database and I can load that file to a variable in VB and replace various
placeholders with the required values.

What is the syntax for saving the contents of the string variable as a
file back on the server?

Thanks for all your help

Jaez



Patrice
Guest
 
Posts: n/a
#2: Oct 19 '07

re: File details


1) See System.IO.File.Exists if the file is local. Despiste you used a URL
as it seems you say you would do this with fso and the site is named
mysite.com I assume this is a file that is on your own server. (if a remote
file you could issue a HTTP request).

2) Same System.IO.FileInfo gives you some details such as the length

3) Not clear. See the Replace statement ? (you want to replace a know
placeholder inside a template file ?). Using a XSL stylesheet to create the
XML file from particular data could be a cleaner option (or creating the XML
directly from the SQL Server)...

"Jaez" <jaezms@ntlworld.coma écrit dans le message de news:
TU_Ri.9905$7a2.490@newsfe3-gui.ntli.net...
Quote:
>I am trying to make my website produce a podcast for itunes with a number
>of item entries and I could really do with help with the following
>practicalities.
>
>
1) How can I determine from my webpage if a particular file exists on the
server.
In VB 6 I would have used something like Set fp =
CreateObject("Scripting.FileSystemObject"): If fp.FileExists....
>
I need something like
If fp.FileExists(http://mysite.com/files/thisfile.mp3) Then
>
>
2) Assumeing that the file exists then I need to know its length in bytes
so I can add this information to my podcast XML file
>
3) I now have my basic XML file template for this file type in an SQL
database and I can load that file to a variable in VB and replace various
placeholders with the required values.
>
What is the syntax for saving the contents of the string variable as a
file back on the server?
>
Thanks for all your help
>
Jaez
>

Closed Thread